Skip to content

Commit 68447f0

Browse files
committed
Merge branch 'jk/index-pack-correct-depth-fix' into maint
* jk/index-pack-correct-depth-fix: index-pack: always zero-initialize object_entry list
2 parents 8ce0ab4 + 57165db commit 68447f0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

builtin/index-pack.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,6 +1107,8 @@ static void conclude_pack(int fix_thin_pack, const char *curr_pack, unsigned cha
11071107
objects = xrealloc(objects,
11081108
(nr_objects + nr_unresolved + 1)
11091109
* sizeof(*objects));
1110+
memset(objects + nr_objects + 1, 0,
1111+
nr_unresolved * sizeof(*objects));
11101112
f = sha1fd(output_fd, curr_pack);
11111113
fix_unresolved_deltas(f, nr_unresolved);
11121114
strbuf_addf(&msg, _("completed with %d local objects"),

0 commit comments

Comments
 (0)