diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-02-10 13:02:16 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-02-10 13:02:16 -0800 |
commit | c329898abb167f05e37f3d0305e833127a26a4d0 (patch) | |
tree | a1011f24c17d6eec6edb52702f5803db5eee5d6f /patch-delta.c | |
parent | b0e67fffb42059cc5dca6f58c376a2ffc5fb4520 (diff) | |
parent | 4ab07e4d1076a1b94b91d58913daeb20eb1c0e2d (diff) | |
download | git-c329898abb167f05e37f3d0305e833127a26a4d0.tar.gz |
Merge branch 'il/maint-xmallocz' into maint
* il/maint-xmallocz:
Fix integer overflow in unpack_compressed_entry()
Fix integer overflow in unpack_sha1_rest()
Fix integer overflow in patch_delta()
Add xmallocz()
Diffstat (limited to 'patch-delta.c')
-rw-r--r-- | patch-delta.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/patch-delta.c b/patch-delta.c index e02e13bd4e..d218faa02b 100644 --- a/patch-delta.c +++ b/patch-delta.c @@ -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) { |