diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-07-18 00:11:40 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-07-18 00:11:40 -0700 |
commit | a70c232e0fcb1a72cec024def0f8b1377f15daf4 (patch) | |
tree | dac3e7aba101be53e48770ada196ee458fa00b62 | |
parent | d85fe389594dc1b6f64c0aae7146a6d92399c3a9 (diff) | |
download | git-a70c232e0fcb1a72cec024def0f8b1377f15daf4.tar.gz |
http-fetch: do not SEGV after fetching a bad pack idx file
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | http-walker.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/http-walker.c b/http-walker.c index 99f397e32b..74033060c4 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; |