From: Junio C Hamano Date: Fri, 18 Jul 2008 07:11:40 +0000 (-0700) Subject: http-fetch: do not SEGV after fetching a bad pack idx file X-Git-Tag: v1.5.6.4~3 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=a70c232;p=git.git http-fetch: do not SEGV after fetching a bad pack idx file Signed-off-by: Junio C Hamano --- diff --git a/http-walker.c b/http-walker.c index 99f397e32..74033060c 100644 --- a/http-walker.c +++ b/http-walker.c @@ -442,6 +442,8 @@ static int setup_index(struct walker *walker, struct alt_base *repo, unsigned ch return -1; new_pack = parse_pack_index(sha1); + if (!new_pack) + return -1; /* parse_pack_index() already issued error message */ new_pack->next = repo->packs; repo->packs = new_pack; return 0;