futility: Add load_firmware_image() error check

It is possible for load_firmware_image() to fail, in which case there
will be a null pointer dereference of image.data in find_gbb(). Prevent
this by returning early if load_firmware_image() fails.

BUG=none
TEST=make clean && make runtests
BRANCH=none

Change-Id: If60fdff2f3a39f07ef0b1e87f0800ac4fb8d5895
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Found-by: Coverity CID 198902
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1752522
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
1 file changed