diff options
author | Roland McGrath <roland@gnu.org> | 1996-07-01 16:32:03 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1996-07-01 16:32:03 +0000 |
commit | 635eb0b5f5a7d83e3c06ee43096b958ce6d84e45 (patch) | |
tree | d4941a71686af0451d158d0b7792547a3f53787d | |
parent | 2baf7c31ad59f41a3df69e9dcf7025fb3b5d071f (diff) | |
download | glibc-635eb0b5f5a7d83e3c06ee43096b958ce6d84e45.zip glibc-635eb0b5f5a7d83e3c06ee43096b958ce6d84e45.tar.gz glibc-635eb0b5f5a7d83e3c06ee43096b958ce6d84e45.tar.bz2 |
Sat Jun 29 00:02:11 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* string/strndup.c (strndup): Properly terminate the new
string; add missing second argument to strnlen.
* string/string.h (strndupa): Likewise.
-rw-r--r-- | string/strndup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/string/strndup.c b/string/strndup.c index c40d00f..8757b86 100644 --- a/string/strndup.c +++ b/string/strndup.c @@ -24,7 +24,7 @@ Cambridge, MA 02139, USA. */ char * strndup (const char *s, size_t n) { - size_t len = strnlen (s); + size_t len = strnlen (s, n); char *new = malloc (len + 1); if (new == NULL) |