diff options
author | Subrata Banik <subrata.banik@intel.com> | 2020-09-06 18:50:14 +0530 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-09-08 05:37:36 +0000 |
commit | 60296aec76e29acd62b999b2cd72bcea1592f1ed (patch) | |
tree | 33a1557fd5b43bb08a01a1c5f156a077885d8384 /util/ifdtool | |
parent | 5bb89e7f0c7e08142cd05dd176b459771d81b8e1 (diff) |
util/ifdtool: Add NULL check for pointer fpsba
This patch adds NULL check inside get_ifd_version_from_fcba()
function to fix Klocwork issue.
BUG=b:153888802
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Change-Id: I525054376b36c658b93760b185ef6dd170f5aea9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45130
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Diffstat (limited to 'util/ifdtool')
-rw-r--r-- | util/ifdtool/ifdtool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/ifdtool/ifdtool.c b/util/ifdtool/ifdtool.c index e2fd0abd1b..fab034ade4 100644 --- a/util/ifdtool/ifdtool.c +++ b/util/ifdtool/ifdtool.c @@ -265,7 +265,7 @@ static int get_ifd_version_from_fcba(char *image, int size) const fcba_t *fcba = find_fcba(image, size); const fdbar_t *fdb = find_fd(image, size); const fpsba_t *fpsba = find_fpsba(image, size); - if (!fcba || !fdb) + if (!fcba || !fdb || !fpsba) exit(EXIT_FAILURE); chipset = guess_ich_chipset(fdb, fpsba); |