commit - 6ced7ba8b0a1cecd667313e4e45f51be404f97c8
commit + 4793d91bf3b955dcc0dab2308ff9ebea06504de3
blob - 8a9418989e78b84876e0c489d374e0d53cf917e7
blob + b6cd712c154536cdfbd3c4dec1d9f014e4630378
--- lib/object_parse.c
+++ lib/object_parse.c
char *s = buf;
size_t label_len;
ssize_t remain = (ssize_t)len;
+
+ if (remain == 0)
+ return got_error(GOT_ERR_BAD_OBJ_DATA);
*commit = got_object_commit_alloc_partial();
if (*commit == NULL)
TAILQ_INIT(&pathlist);
+ if (remain == 0)
+ return got_error(GOT_ERR_BAD_OBJ_DATA);
+
*tree = calloc(1, sizeof(**tree));
if (*tree == NULL)
return got_error_from_errno("calloc");
size_t remain = len;
char *s = buf;
size_t label_len;
+
+ if (remain == 0)
+ return got_error(GOT_ERR_BAD_OBJ_DATA);
*tag = calloc(1, sizeof(**tag));
if (*tag == NULL)