From: Jeff King Date: Thu, 28 Jan 2010 14:52:16 +0000 (-0500) Subject: rerere: fix too-short initialization X-Git-Tag: v1.7.0-rc1~17 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=af86debc8620006702ef217d5b7687b300c75104;p=git.git rerere: fix too-short initialization This was caused by a typo in the sizeof parameter, and meant we looked at uninitialized memory. Caught by valgrind in t2030. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- diff --git a/rerere.c b/rerere.c index a86d73d9d..d1d3e7539 100644 --- a/rerere.c +++ b/rerere.c @@ -325,7 +325,7 @@ static int handle_cache(const char *path, unsigned char *sha1, const char *outpu for (i = 0; i < 3; i++) free(mmfile[i].ptr); - memset(&io, 0, sizeof(&io)); + memset(&io, 0, sizeof(io)); io.io.getline = rerere_mem_getline; if (output) io.io.output = fopen(output, "w");