summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2006-10-18 19:56:22 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-10-19 04:18:42 (GMT)
commit1a3b55c6b424904835ebfd74c992a5bffbaa7e7e (patch)
treeada671a61f2e304313139c36c6296f5895aad615 /sha1_file.c
parente0b0830726286287744cc9e1a629a534bbe75452 (diff)
downloadgit-1a3b55c6b424904835ebfd74c992a5bffbaa7e7e.zip
git-1a3b55c6b424904835ebfd74c992a5bffbaa7e7e.tar.gz
git-1a3b55c6b424904835ebfd74c992a5bffbaa7e7e.tar.bz2
reduce delta head inflated size
Supposing that both the base and result sizes were both full size 64-bit values, their encoding would occupy only 9.2 bytes each. Therefore inflating 64 bytes is way overkill. Limit it to 20 bytes instead which should be plenty enough for a couple years to come. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sha1_file.c b/sha1_file.c
index 716aef3..47e2a29 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -908,7 +908,7 @@ static int packed_delta_info(struct packed_git *p,
if (sizep) {
const unsigned char *data;
- unsigned char delta_head[64];
+ unsigned char delta_head[20];
unsigned long result_size;
z_stream stream;
int st;