aboutsummaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-06-28 14:55:16 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-28 15:12:25 -0700
commitd85a4feeee2cb94ff7060de45a5421f575ddf7b8 (patch)
treeb8015ec53eac91f49abcb30e6b9f66c6e42a5993 /sha1_file.c
parent23676d407c63a6f67f8ce3ff192199bda03e6a03 (diff)
downloadgit-d85a4feeee2cb94ff7060de45a5421f575ddf7b8.tar.gz
git-d85a4feeee2cb94ff7060de45a5421f575ddf7b8.tar.xz
[PATCH] Bugfix: initialize pack_base to NULL.
This was causing random segfaults, because use_packed_git() got confused by random garbage there. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sha1_file.c b/sha1_file.c
index 6e3fd180f..5c6e964a3 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -396,6 +396,7 @@ static struct packed_git *add_packed_git(char *path, int path_len)
p->pack_size = st.st_size;
p->index_base = idx_map;
p->next = NULL;
+ p->pack_base = NULL;
p->pack_last_used = 0;
return p;
}