提交 1a3b55c6 编写于 作者: N Nicolas Pitre 提交者: Junio C Hamano

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: NNicolas Pitre <nico@cam.org>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 e0b08307
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册