futility/updater: Check that image exists before digging into it
Found by Coverity Scan BUG=none BRANCH=none TEST=none Change-Id: I2544a4e84ecadc262e08aaa4e6f056d710d807f5 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1771972 Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org> Tested-by: Patrick Georgi <pgeorgi@chromium.org> Commit-Queue: Patrick Georgi <pgeorgi@chromium.org>
This commit is contained in:
parent
9d0e53cae9
commit
5cb2e84a19
|
@ -618,6 +618,11 @@ static int load_firmware_version(struct firmware_image *image,
|
|||
int load_firmware_image(struct firmware_image *image, const char *file_name,
|
||||
struct archive *archive)
|
||||
{
|
||||
if (!file_name) {
|
||||
ERROR("No file name given\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
VB2_DEBUG("Load image file from %s...\n", file_name);
|
||||
|
||||
if (!archive_has_entry(archive, file_name)) {
|
||||
|
|
Loading…
Reference in New Issue