Skip to content

Commit

Permalink
http-fetch: do not SEGV after fetching a bad pack idx file
Browse files Browse the repository at this point in the history
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Jul 18, 2008
1 parent d85fe38 commit a70c232
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions http-walker.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a70c232

Please sign in to comment.