Skip to content

Commit

Permalink
http-push: do not SEGV after fetching a bad pack idx file
Browse files Browse the repository at this point in the history
In a70c232 ("http-fetch: do not SEGV after fetching a bad pack idx
file"), changes were made to the setup_index method in http-fetch.c
(known in its present form as http-walker.c after 30ae764 ("Modularize
commit-walker")). Since http-push.c has similar similar code for
processing index files, these changes should apply to http-push.c's
implementation of setup_index as well.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Tay Ray Chuan authored and Junio C Hamano committed Jun 6, 2009
1 parent 20cfb3a commit 1b1b7b2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions http-push.c
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,8 @@ static int setup_index(unsigned char *sha1)
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 1b1b7b2

Please sign in to comment.