1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-09 11:46:11 +02:00

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

NULL is not considered a VALID pathspec.
This commit is contained in:
Linus Torvalds 2005-06-08 11:31:53 -07:00
parent 7d95ee9351
commit f9e7750621

View File

@ -33,7 +33,7 @@ struct diff_filespec {
* if false, use the name and read from
* 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_munmap : 1; /* data should be munmap()'ed */
};