diff options
Diffstat (limited to 'string')
-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 c40d00fc59..8757b869d5 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) |