[PATCH] Re-Fix SIGSEGV on unmerged files in git-diff-files -p
When an unmerged path was fed via diff_unmerged() into diffcore, it eventually called run_diff() with "one" and "two" parameters with NULL, but run_diff() was not written carefully enough to notice this situation. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
206de27efa
commit
dc7090efbc
@ -33,7 +33,7 @@ struct diff_filespec {
|
||||
* if false, use the name and read from
|
||||
* the filesystem.
|
||||
*/
|
||||
#define DIFF_FILE_VALID(spec) ((spec) && ((spec)->mode) != 0)
|
||||
#define DIFF_FILE_VALID(spec) (((spec)->mode) != 0)
|
||||
unsigned should_free : 1; /* data should be free()'ed */
|
||||
unsigned should_munmap : 1; /* data should be munmap()'ed */
|
||||
};
|
||||
|
Reference in New Issue
Block a user