Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
http-fetch: do not SEGV after fetching a bad pack idx file
author
Junio C Hamano
<gitster@pobox.com>
Fri, 18 Jul 2008 07:11:40 +0000
(
00:11
-0700)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 18 Jul 2008 07:11:40 +0000
(
00:11
-0700)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http-walker.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
d85fe38
)
diff --git
a/http-walker.c
b/http-walker.c
index 99f397e32b673e289c2f9d298b1287a97cb7a49e..74033060c4e85b23a947ea5799d8ea96e6040da0 100644
(file)
--- 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);
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;
new_pack->next = repo->packs;
repo->packs = new_pack;
return 0;