diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-04-04 13:00:37 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-04-04 13:00:37 -0700 |
commit | 68447f04f45cd7689e635714bcb778cb3e2c725d (patch) | |
tree | c29a533a034cbf7ff1583ede14c15622ac3ddf0f | |
parent | 8ce0ab4ec842ce08b4267d1bd62eff2f0fdba592 (diff) | |
parent | 57165db00309e756d6d22b097a2fd6cc14055d14 (diff) | |
download | git-68447f04f45cd7689e635714bcb778cb3e2c725d.tar.gz git-68447f04f45cd7689e635714bcb778cb3e2c725d.tar.xz |
Merge branch 'jk/index-pack-correct-depth-fix' into maint
* jk/index-pack-correct-depth-fix:
index-pack: always zero-initialize object_entry list
-rw-r--r-- | builtin/index-pack.c | 2 |
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"), |