X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=patch-delta.c;h=d218faa02bd12b0e6a0df298a6a0e5787e46d93f;hb=347d04d0e2a0f5813a80eed7ce2b38debaf5ce00;hp=ef748ce96d246bb17c6e64b51b882d535d7f7774;hpb=011c181cc656c8b3e48882729d1b6238e8c5c537;p=git.git diff --git a/patch-delta.c b/patch-delta.c index ef748ce96..d218faa02 100644 --- a/patch-delta.c +++ b/patch-delta.c @@ -2,7 +2,7 @@ * patch-delta.c: * recreate a buffer from a source and the delta produced by diff-delta.c * - * (C) 2005 Nicolas Pitre + * (C) 2005 Nicolas Pitre * * This code is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -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) {