From d85a4feeee2cb94ff7060de45a5421f575ddf7b8 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 28 Jun 2005 14:55:16 -0700 Subject: [PATCH] [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 Signed-off-by: Linus Torvalds --- sha1_file.c | 1 + 1 file changed, 1 insertion(+) 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; } -- 2.30.2