summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3aee68a)
raw | patch | inline | side by side (parent: 3aee68a)
author | Ilari Liusvaara <ilari.liusvaara@elisanet.fi> | |
Tue, 26 Jan 2010 18:24:15 +0000 (20:24 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 26 Jan 2010 21:00:16 +0000 (13:00 -0800) |
Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_file.c | patch | blob | history |
diff --git a/sha1_file.c b/sha1_file.c
index a903247677bfe1d41a14f8f153d66494837c86b7..23d347c45fcf2a93ee59b9ddea996ec432038200 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
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;