projects
/
oweals
/
gnunet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
- fix
[oweals/gnunet.git]
/
src
/
util
/
common_allocation.c
diff --git
a/src/util/common_allocation.c
b/src/util/common_allocation.c
index 89be027e706b5caa9ae22810d543a52666d8214b..dfa65d579dc6b74b0e566e44baff2fc5451dcaa1 100644
(file)
--- a/
src/util/common_allocation.c
+++ b/
src/util/common_allocation.c
@@
-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);