diff options
| author | Xin LI <delphij@FreeBSD.org> | 2008-10-17 21:29:05 +0000 |
|---|---|---|
| committer | Xin LI <delphij@FreeBSD.org> | 2008-10-17 21:29:05 +0000 |
| commit | f53577c0d4d28b6cfdac6c96192d8a499015ae45 (patch) | |
| tree | 194e3924de9e172822bdccb51bda9541e237a6da /lib/libc | |
| parent | 0ea291e2216fc45053d4f2fdcf067f78af0cc4de (diff) | |
Notes
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/string/strxfrm.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libc/string/strxfrm.c b/lib/libc/string/strxfrm.c index 81e05af6ab7b..cce6c0f531af 100644 --- a/lib/libc/string/strxfrm.c +++ b/lib/libc/string/strxfrm.c @@ -51,8 +51,7 @@ strxfrm(char * __restrict dest, const char * __restrict src, size_t len) if (slen < len) strcpy(dest, src); else { - strncpy(dest, src, len - 1); - dest[len - 1] = '\0'; + strlcpy(dest, src, len); } } return slen; |
