projects
/
external
/
glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2baf7c3
)
Sat Jun 29 00:02:11 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
author
Roland McGrath
<roland@gnu.org>
Mon, 1 Jul 1996 16:32:03 +0000
(16:32 +0000)
committer
Roland McGrath
<roland@gnu.org>
Mon, 1 Jul 1996 16:32:03 +0000
(16:32 +0000)
* string/strndup.c (strndup): Properly terminate the new
string; add missing second argument to strnlen.
* string/string.h (strndupa): Likewise.
string/strndup.c
patch
|
blob
|
history
diff --git
a/string/strndup.c
b/string/strndup.c
index
c40d00f
..
8757b86
100644
(file)
--- 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)