diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-03-13 15:47:35 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-03-13 15:47:35 +0000 |
commit | 6c0bb8c7a42d42230f0786e8b4ca6567ded4fc69 (patch) | |
tree | 549f35a4cc07f24fe880b6d321af9a23b64cdbef /lib/libc/string | |
parent | 1e46612221e29a3f44b51938a54918044e96afd0 (diff) |
a few more strlcy; ok from beck & ho
Diffstat (limited to 'lib/libc/string')
-rw-r--r-- | lib/libc/string/__strerror.c | 6 | ||||
-rw-r--r-- | lib/libc/string/__strsignal.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/libc/string/__strerror.c b/lib/libc/string/__strerror.c index ae19ab33654..7301a7bc84c 100644 --- a/lib/libc/string/__strerror.c +++ b/lib/libc/string/__strerror.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: __strerror.c,v 1.8 2001/12/08 20:37:32 deraadt Exp $"; +static char *rcsid = "$OpenBSD: __strerror.c,v 1.9 2003/03/13 15:47:33 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #ifdef NLS @@ -98,9 +98,9 @@ __strerror(num, buf) #ifdef NLS strlcpy(buf, catgets(catd, 1, 0xffff, UPREFIX), NL_TEXTMAX); #else - strcpy(buf, UPREFIX); + strlcpy(buf, UPREFIX, NL_TEXTMAX); #endif - strncat(buf, itoa(errnum), NL_TEXTMAX-strlen(buf)-1); + strlcat(buf, itoa(errnum), NL_TEXTMAX); errno = EINVAL; } diff --git a/lib/libc/string/__strsignal.c b/lib/libc/string/__strsignal.c index 4ca5bad3c0f..26168722326 100644 --- a/lib/libc/string/__strsignal.c +++ b/lib/libc/string/__strsignal.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: __strsignal.c,v 1.6 2001/06/27 00:58:56 lebel Exp $"; +static char *rcsid = "$OpenBSD: __strsignal.c,v 1.7 2003/03/13 15:47:33 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #ifdef NLS @@ -89,9 +89,9 @@ __strsignal(num, buf) #ifdef NLS strlcpy(buf, catgets(catd, 1, 0xffff, UPREFIX), NL_TEXTMAX); #else - strcpy(buf, UPREFIX); + strlcpy(buf, UPREFIX, NL_TEXTMAX); #endif - strncat(buf, itoa(signum), NL_TEXTMAX-strlen(buf)-1); + strlcat(buf, itoa(signum), NL_TEXTMAX); } #ifdef NLS |