diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2024-02-05 14:35:53 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-02-06 10:42:28 -0800 |
commit | 568459bf5e97a4f61429e3bdd1f97b54b39a1383 (patch) | |
tree | 7b17660c5d8aecf25dc3060c5c80ffa19d7b22c1 /bisect.c | |
parent | 564d0252ca632e0264ed670534a51d18a689ef5d (diff) | |
download | git-568459bf5e97a4f61429e3bdd1f97b54b39a1383.tar.gz |
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>
Diffstat (limited to 'bisect.c')
-rw-r--r-- | bisect.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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' : ' ', |