A pack with no trees (or an empty pack) could have zero-sized name dictionary. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> --- packv4-parse.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packv4-parse.c b/packv4-parse.c index f96acc1..80ad6fc 100644 --- a/packv4-parse.c +++ b/packv4-parse.c @@ -87,10 +87,6 @@ static struct packv4_dict *load_dict(struct packed_git *p, off_t *offset) src = use_pack(p, &w_curs, curpos, &avail); cp = src; dict_size = decode_varint(&cp); - if (dict_size < 3) { - error("bad dict size"); - return NULL; - } curpos += cp - src; data = xmallocz(dict_size); -- 1.8.2.82.gc24b958 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html