aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-11-13 00:22:35 +0000
committerChristian Grothoff <christian@grothoff.org>2012-11-13 00:22:35 +0000
commit7919161117c5c4d952e664a46b7cf5c1e4c9c5b2 (patch)
tree03238d2daf9ba86655b5a03f9a23252bed5ce3a9
parent29aca09f2d1b6f4c56a638dd2aaef0352ff81bee (diff)
downloadgnunet-7919161117c5c4d952e664a46b7cf5c1e4c9c5b2.tar.gz
gnunet-7919161117c5c4d952e664a46b7cf5c1e4c9c5b2.zip
-wtf
-rw-r--r--src/util/common_allocation.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/common_allocation.c b/src/util/common_allocation.c
index 1828d826a..22dfb2509 100644
--- 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,
272 char *res; 272 char *res;
273 273
274 GNUNET_assert_at (str != NULL, filename, linenumber); 274 GNUNET_assert_at (str != NULL, filename, linenumber);
275 len = GNUNET_MIN (len, strlen (str)); 275 len = strnlen (str, len);
276 res = GNUNET_xmalloc_ (len + 1, filename, linenumber); 276 res = GNUNET_xmalloc_ (len + 1, filename, linenumber);
277 memcpy (res, str, len); 277 memcpy (res, str, len);
278 /* res[len] = '\0'; 'malloc' zeros out anyway */ 278 /* res[len] = '\0'; 'malloc' zeros out anyway */