]> git.cameronkatri.com Git - cgit.git/blobdiff - shared.c
diffstat: do not rely on uninitialized data
[cgit.git] / shared.c
index 7e88bbd4fb33555066d14df98402277a97e96bee..8ed14c0bdbcbf378dd2adc439e21f5895b6e4ac9 100644 (file)
--- a/shared.c
+++ b/shared.c
@@ -368,6 +368,7 @@ void cgit_diff_tree(const unsigned char *old_sha1,
        struct diff_options opt;
        struct pathspec_item item;
 
+       memset(&item, 0, sizeof(item));
        diff_setup(&opt);
        opt.output_format = DIFF_FORMAT_CALLBACK;
        opt.detect_rename = 1;