aboutsummaryrefslogtreecommitdiff
path: root/patch-delta.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-09-04 15:47:28 -0700
committerJunio C Hamano <junkio@cox.net>2005-09-04 15:47:28 -0700
commitf5f2c52bb08a7fc5bde6a7eb6552235df9daca71 (patch)
tree8a3114a7c1ca47a98b03a01f688666a026a6948f /patch-delta.c
parent8afaf4cbefc735d71d1417a74b9cc20b0e3c6770 (diff)
parent52be5fcd29e074cb549b9a92ff8caceb736e4851 (diff)
downloadgit-f5f2c52bb08a7fc5bde6a7eb6552235df9daca71.tar.xz
Merge branch 'master' of .
Diffstat (limited to 'patch-delta.c')
-rw-r--r--patch-delta.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/patch-delta.c b/patch-delta.c
index 26281ea123..98c27beb25 100644
--- a/patch-delta.c
+++ b/patch-delta.c
@@ -34,9 +34,10 @@ void *patch_delta(void *src_buf, unsigned long src_size,
/* now the result size */
size = get_delta_hdr_size(&data);
- dst_buf = malloc(size);
+ dst_buf = malloc(size + 1);
if (!dst_buf)
return NULL;
+ dst_buf[size] = 0;
out = dst_buf;
while (data < top) {