projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
29aca09
)
-wtf
author
Christian Grothoff
<christian@grothoff.org>
Tue, 13 Nov 2012 00:22:35 +0000
(
00:22
+0000)
committer
Christian Grothoff
<christian@grothoff.org>
Tue, 13 Nov 2012 00:22:35 +0000
(
00:22
+0000)
src/util/common_allocation.c
patch
|
blob
|
history
diff --git
a/src/util/common_allocation.c
b/src/util/common_allocation.c
index 1828d826a5a24a4355f92b0b6dd528adc6219f83..22dfb2509c3538fc459c9fac07538f4b15b930e0 100644
(file)
--- a/
src/util/common_allocation.c
+++ b/
src/util/common_allocation.c
@@
-272,7
+272,7
@@
GNUNET_xstrndup_ (const char *str, size_t len, const char *filename,
char *res;
GNUNET_assert_at (str != NULL, filename, linenumber);
- len =
GNUNET_MIN (len, strlen (str)
);
+ len =
strnlen (str, len
);
res = GNUNET_xmalloc_ (len + 1, filename, linenumber);
memcpy (res, str, len);
/* res[len] = '\0'; 'malloc' zeros out anyway */