Skip to content

Commit af86deb

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8e52dc3 commit af86deb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rerere.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ static int handle_cache(const char *path, unsigned char *sha1, const char *outpu
325325
for (i = 0; i < 3; i++)
326326
free(mmfile[i].ptr);
327327

328-
memset(&io, 0, sizeof(&io));
328+
memset(&io, 0, sizeof(io));
329329
io.io.getline = rerere_mem_getline;
330330
if (output)
331331
io.io.output = fopen(output, "w");

0 commit comments

Comments
 (0)