aboutsummaryrefslogtreecommitdiff
path: root/builtin/index-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-04-01 09:06:19 -0700
committerJunio C Hamano <gitster@pobox.com>2013-04-01 09:06:19 -0700
commited8852c286273405e5898e44bda57d2d48d2b4cb (patch)
treee977b9b16d23c21fe9440879676cc1b37004bcba /builtin/index-pack.c
parentca54e43cf29766980994555cf794b80b8cd9155f (diff)
parent57165db00309e756d6d22b097a2fd6cc14055d14 (diff)
downloadgit-ed8852c286273405e5898e44bda57d2d48d2b4cb.tar.gz
git-ed8852c286273405e5898e44bda57d2d48d2b4cb.tar.xz
Merge branch 'jk/index-pack-correct-depth-fix'
"index-pack --fix-thin" used uninitialize value to compute delta depths of objects it appends to the resulting pack. * jk/index-pack-correct-depth-fix: index-pack: always zero-initialize object_entry list
Diffstat (limited to 'builtin/index-pack.c')
-rw-r--r--builtin/index-pack.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index ef62124aa..3a3051d53 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -1107,6 +1107,8 @@ static void conclude_pack(int fix_thin_pack, const char *curr_pack, unsigned cha
objects = xrealloc(objects,
(nr_objects + nr_unresolved + 1)
* sizeof(*objects));
+ memset(objects + nr_objects + 1, 0,
+ nr_unresolved * sizeof(*objects));
f = sha1fd(output_fd, curr_pack);
fix_unresolved_deltas(f, nr_unresolved);
strbuf_addf(&msg, _("completed with %d local objects"),