tag.c: Parse tagger date (if present)
[gitweb.git] / sha1_file.c
index a903247677bfe1d41a14f8f153d66494837c86b7..23d347c45fcf2a93ee59b9ddea996ec432038200 100644 (file)
@@ -1582,8 +1582,7 @@ static void *unpack_compressed_entry(struct packed_git *p,
        z_stream stream;
        unsigned char *buffer, *in;
 
-       buffer = xmalloc(size + 1);
-       buffer[size] = 0;
+       buffer = xmallocz(size);
        memset(&stream, 0, sizeof(stream));
        stream.next_out = buffer;
        stream.avail_out = size + 1;