Commit Diff


commit - 9ef4ac1620c773e31257fdb1fe0672af1550b569
commit + c7c59d3c0510a0bf293d307ddbbcc4db4e0b48bd
blob - dce23091a93105abdf80728f6058069c6b81c763
blob + 5e3bfc450d7e8bb383b95b57574ff07b1c331166
--- lib/object_parse.c
+++ lib/object_parse.c
@@ -146,12 +146,8 @@ got_object_parse_header(struct got_object **obj, char 
 	int type = 0;
 	size_t size = 0, hdrlen = 0;
 	int i;
-	char *p = strchr(buf, '\0');
 
 	*obj = NULL;
-
-	if (p == NULL)
-		return got_error(GOT_ERR_BAD_OBJ_HDR);
 
 	hdrlen = strnlen(buf, len) + 1 /* '\0' */;
 	if (hdrlen > len)