summaryrefslogtreecommitdiffstats
path: root/lib/mangle.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mangle.c')
-rw-r--r--lib/mangle.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/mangle.c b/lib/mangle.c
index 99e8281e6..a5e157bc9 100644
--- a/lib/mangle.c
+++ b/lib/mangle.c
@@ -94,6 +94,8 @@ char *unmangle(const char *s, char **end)
if (end)
*end = e;
+ if (e == s)
+ return NULL; /* empty string */
buf = malloc(sz);
if (!buf)