X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=patch-delta.c;h=d218faa02bd12b0e6a0df298a6a0e5787e46d93f;hb=b3f01ff29f7131e959bcfdfd004744d74d5fa319;hp=e02e13bd4eb2a92626c2d6f9cbf264abb15de9c5;hpb=35da43e9bb4a5d7542c2ee27e0a3557ac921e3ab;p=git.git diff --git a/patch-delta.c b/patch-delta.c index e02e13bd4..d218faa02 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) {