Always check the return value of repo_read_object_file()
There are a couple of places in Git's source code where the return value is not checked. As a consequence, they are susceptible to segmentation faults. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
564d0252ca
commit
568459bf5e
3
bisect.c
3
bisect.c
@@ -159,6 +159,9 @@ static void show_list(const char *debug, int counted, int nr,
|
||||
const char *subject_start;
|
||||
int subject_len;
|
||||
|
||||
if (!buf)
|
||||
die(_("unable to read %s"), oid_to_hex(&commit->object.oid));
|
||||
|
||||
fprintf(stderr, "%c%c%c ",
|
||||
(commit_flags & TREESAME) ? ' ' : 'T',
|
||||
(commit_flags & UNINTERESTING) ? 'U' : ' ',
|
||||
|
||||
Reference in New Issue
Block a user