Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/45130 )
Change subject: util/ifdtool: Add NULL check for pointer fpsba ......................................................................
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 --- M util/ifdtool/ifdtool.c 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Patrick Rudolph: Looks good to me, approved
diff --git a/util/ifdtool/ifdtool.c b/util/ifdtool/ifdtool.c index e2fd0ab..fab034a 100644 --- a/util/ifdtool/ifdtool.c +++ b/util/ifdtool/ifdtool.c @@ -265,7 +265,7 @@ 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);