Commit Diff


commit - 8aa8d060487d0252e708ffa1d8595a3846ceb46f
commit + d92ddc8dc46345e47f1ab1626e203ec3c59569c4
blob - cce6d606b059b5cc58d9428affcc6837cd222b60
blob + 6fcd532e14f86ae395c54c63b86bc7645d6e0695
--- parser.c
+++ parser.c
@@ -137,6 +137,9 @@ parser_append(struct buffer *b, const char *buf, size_
 	size_t newlen;
 	char *t;
 
+	if (len == 0)
+		return (1);
+
 	newlen = len + b->len;
 	t = xcalloc(1, newlen);
 	memcpy(t, b->buf, b->len);