]> git.ipfire.org Git - thirdparty/git.git/blobdiff - patch-delta.c
Merge branch 'ae/better-template-failure-report'
[thirdparty/git.git] / patch-delta.c
index ef748ce96d246bb17c6e64b51b882d535d7f7774..d218faa02bd12b0e6a0df298a6a0e5787e46d93f 100644 (file)
@@ -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 <nico@cam.org>
+ * (C) 2005 Nicolas Pitre <nico@fluxnic.net>
  *
  * 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) {