mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00:00
http-fetch: do not SEGV after fetching a bad pack idx file
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
d85fe38959
commit
a70c232e0f
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue