@matheusbsbs / matheus-bagliano / commits / af86debc86
Fork 0

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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Jan 28, 2010 at 09:52 UTC af86debc8620006702ef217d5b7687b300c75104
1 file changed +1 -1
rerere.c
+1 -1
@@ -325,7 +325,7 @@ static int handle_cache(const char *path, unsigned char *sha1, const char *outpu
325 for (i = 0; i < 3; i++)
326 free(mmfile[i].ptr);
327
328 - memset(&io, 0, sizeof(&io));
328 + memset(&io, 0, sizeof(io));
329 io.io.getline = rerere_mem_getline;
330 if (output)
331 io.io.output = fopen(output, "w");