diff options
author | Patrick Georgi <pgeorgi@google.com> | 2019-08-27 17:27:39 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-09-09 22:37:15 +0000 |
commit | 5cb2e84a191583f0e4d01ee6077404f85531f6c7 (patch) | |
tree | 999038b49686217ffe17132f0e8107609d6cb52d /futility/updater.c | |
parent | 9d0e53cae9ed9c84fc5cd5b1fb2b11e42f7c420a (diff) | |
download | vboot-stabilize-12499.18.B.tar.gz |
futility/updater: Check that image exists before digging into itstabilize-12515.Bstabilize-12499.18.Brelease-R78-12499.B
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>
Diffstat (limited to 'futility/updater.c')
-rw-r--r-- | futility/updater.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/futility/updater.c b/futility/updater.c index ef75d747..4d523e29 100644 --- a/futility/updater.c +++ b/futility/updater.c @@ -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)) { |