From a70c232e0fcb1a72cec024def0f8b1377f15daf4 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 18 Jul 2008 00:11:40 -0700 Subject: [PATCH] http-fetch: do not SEGV after fetching a bad pack idx file Signed-off-by: Junio C Hamano --- http-walker.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.26.2