libpayload: Implement strlcpy

Change-Id: Ibd339957690afe2cded46895c3088eba87f0ffd1
Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com>
Reviewed-on: http://review.coreboot.org/85
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Patrick Georgi
2011-03-11 09:34:23 +01:00
committed by Patrick Georgi
parent 23b6c8f7ca
commit 163e220c5d
3 changed files with 61 additions and 1 deletions

View File

@ -55,7 +55,6 @@ int strncasecmp(const char *s1, const char *s2, size_t maxlen);
char *strncpy(char *d, const char *s, size_t n);
char *strcpy(char *d, const char *s);
char *strncat(char *d, const char *s, size_t n);
size_t strlcat(char *d, const char *s, size_t n);
char *strcat(char *d, const char *s);
char *strchr(const char *s, int c);
char *strrchr(const char *s, int c);
@ -68,4 +67,13 @@ char* strtok(char *str, const char *delim);
char* strtok_r(char *str, const char *delim, char **ptr);
/** @} */
/**
* @defgroup string OpenBSD based safe string functions
* @{
*/
size_t strlcpy(char *d, const char *s, size_t n);
size_t strlcat(char *d, const char *s, size_t n);
/** @} */
#endif