summaryrefslogtreecommitdiff
path: root/builtin-pack-objects.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-03-24 15:31:21 -0700
committerJunio C Hamano <gitster@pobox.com>2009-03-24 15:31:21 -0700
commitb0de55541024a39ece47cf7a1eebdbde08ba978f (patch)
tree5b652d49aaab85a7571aa41978f39dc80c1a6b48 /builtin-pack-objects.c
parentcbc8c6104199ffa63b61f4e8dee32d3a713e2939 (diff)
parent2a5643da732b70004920f75efa1ebdc2a6ed1689 (diff)
downloadgit-b0de55541024a39ece47cf7a1eebdbde08ba978f.tar.gz
Merge branch 'maint-1.6.1' into maint
* maint-1.6.1: 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 bcefa52c69..8ca46c8deb 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;