diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-02-15 00:36:06 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-02-15 00:36:06 +0100 |
commit | c59ba68ea7d1b4614fa964403a6c662dca0dd212 (patch) | |
tree | ba54ccb735bf678d57407f9053f179867cc038f5 /combine-diff.c | |
parent | Merge branch 'rs/receive-pack-remove-find-header' (diff) | |
parent | Always check the return value of `repo_read_object_file()` (diff) | |
download | git-c59ba68ea7d1b4614fa964403a6c662dca0dd212.tar.xz git-c59ba68ea7d1b4614fa964403a6c662dca0dd212.zip |
Merge branch 'js/check-null-from-read-object-file'
The code paths that call repo_read_object_file() have been
tightened to react to errors.
* js/check-null-from-read-object-file:
Always check the return value of `repo_read_object_file()`
Diffstat (limited to 'combine-diff.c')
-rw-r--r-- | combine-diff.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/combine-diff.c b/combine-diff.c index db94581f72..d6d6fa1689 100644 --- a/combine-diff.c +++ b/combine-diff.c @@ -337,6 +337,8 @@ static char *grab_blob(struct repository *r, free_filespec(df); } else { blob = repo_read_object_file(r, oid, &type, size); + if (!blob) + die(_("unable to read %s"), oid_to_hex(oid)); if (type != OBJ_BLOB) die("object '%s' is not a blob!", oid_to_hex(oid)); } |