From 7919161117c5c4d952e664a46b7cf5c1e4c9c5b2 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 13 Nov 2012 00:22:35 +0000 Subject: -wtf --- src/util/common_allocation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/util/common_allocation.c') 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, 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 */ -- cgit v1.2.3