-remove async ecc key generation, not needed
[oweals/gnunet.git] / src / util / common_allocation.c
index 89be027e706b5caa9ae22810d543a52666d8214b..dfa65d579dc6b74b0e566e44baff2fc5451dcaa1 100644 (file)
@@ -286,6 +286,8 @@ GNUNET_xstrndup_ (const char *str, size_t len, const char *filename,
 {
   char *res;
 
+  if (0 == len)
+    return GNUNET_strdup ("");
   GNUNET_assert_at (str != NULL, filename, linenumber);
   len = strnlen (str, len);
   res = GNUNET_xmalloc_ (len + 1, filename, linenumber);