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()`
This commit is contained in:
@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user