Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'jk/index-pack-correct-depth-fix'
author
Junio C Hamano
<gitster@pobox.com>
Mon, 1 Apr 2013 16:06:19 +0000
(09:06 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 1 Apr 2013 16:06:19 +0000
(09:06 -0700)
"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
builtin/index-pack.c
patch
|
blob
|
history
raw
(from parent 1:
ca54e43
)
diff --git
a/builtin/index-pack.c
b/builtin/index-pack.c
index ef62124aa491a9ac1e430d5baa3cf448902ac9c4..3a3051d53e03cfb51d7eb156356f158e11f64b10 100644
(file)
--- 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"),