1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-04-28 06:55:08 +02:00

Fix integer overflow in patch_delta()

Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Ilari Liusvaara 2010-01-26 20:24:13 +02:00 committed by Junio C Hamano
parent 5bf9219d01
commit 222083a158

View File

@ -33,8 +33,7 @@ void *patch_delta(const void *src_buf, unsigned long src_size,
/* now the result size */
size = get_delta_hdr_size(&data, top);
dst_buf = xmalloc(size + 1);
dst_buf[size] = 0;
dst_buf = xmallocz(size);
out = dst_buf;
while (data < top) {