summaryrefslogtreecommitdiff
path: root/builtin-pack-objects.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-03-24 19:45:57 -0700
committerJunio C Hamano <gitster@pobox.com>2009-03-24 19:45:57 -0700
commit89fbda24256157cc43848488429fd20cf3bb21ab (patch)
tree0e896125f1dfc70eed99f703b22494540c9a5000 /builtin-pack-objects.c
parent7c98213abc2a834f16646b9fe842f6e63c7ddb81 (diff)
parent389d17677187f5e996022b7b8e0faf800608cb3a (diff)
downloadgit-89fbda24256157cc43848488429fd20cf3bb21ab.tar.gz
Merge branch 'maint'
* maint: Increase the size of the die/warning buffer to avoid truncation close_sha1_file(): make it easier to diagnose errors avoid possible overflow in delta size filtering computation
Diffstat (limited to 'builtin-pack-objects.c')
-rw-r--r--builtin-pack-objects.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 1c6d2c498b..2000d97ec4 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -1293,7 +1293,7 @@ static int try_delta(struct unpacked *trg, struct unpacked *src,
max_size = trg_entry->delta_size;
ref_depth = trg->depth;
}
- max_size = max_size * (max_depth - src->depth) /
+ max_size = (uint64_t)max_size * (max_depth - src->depth) /
(max_depth - ref_depth + 1);
if (max_size == 0)
return 0;