Commit c02c5308 by Jacques Germishuys Committed by Carlos Martín Nieto

Ensure patch is initialized to zero, otherwise, the allocated flag may be set

parent 6004658d
...@@ -274,6 +274,7 @@ int git_diff_foreach( ...@@ -274,6 +274,7 @@ int git_diff_foreach(
return error; return error;
memset(&xo, 0, sizeof(xo)); memset(&xo, 0, sizeof(xo));
memset(&patch, 0, sizeof(patch));
diff_output_init( diff_output_init(
&xo.output, &diff->opts, file_cb, hunk_cb, data_cb, payload); &xo.output, &diff->opts, file_cb, hunk_cb, data_cb, payload);
git_xdiff_init(&xo, &diff->opts); git_xdiff_init(&xo, &diff->opts);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment