Browse Source

Fix SIGSEGV on unmerged files in git-diff-files -p

NULL is not considered a VALID pathspec.
maint
Linus Torvalds 20 years ago
parent
commit
f9e7750621
  1. 2
      diffcore.h

2
diffcore.h

@ -33,7 +33,7 @@ struct diff_filespec {
* if false, use the name and read from * if false, use the name and read from
* the filesystem. * the filesystem.
*/ */
#define DIFF_FILE_VALID(spec) (((spec)->mode) != 0) #define DIFF_FILE_VALID(spec) ((spec) && ((spec)->mode) != 0)
unsigned should_free : 1; /* data should be free()'ed */ unsigned should_free : 1; /* data should be free()'ed */
unsigned should_munmap : 1; /* data should be munmap()'ed */ unsigned should_munmap : 1; /* data should be munmap()'ed */
}; };

Loading…
Cancel
Save