Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32290 )
Change subject: Klocwork: Fix the Null pointer derefernce found by klocwork ......................................................................
Patch Set 3:
(4 comments)
https://review.coreboot.org/#/c/32290/3/src/lib/coreboot_table.c File src/lib/coreboot_table.c:
https://review.coreboot.org/#/c/32290/3/src/lib/coreboot_table.c@236 PS3, Line 236: if (wd) Are you running your static analysis with CONFIG_FATAL_ASSERTS? Because vboot_get_working_data() cannot return NULL -- there's literally an assert(wd != NULL) right at the end.
https://review.coreboot.org/#/c/32290/3/src/security/vboot/common.c File src/security/vboot/common.c:
https://review.coreboot.org/#/c/32290/3/src/security/vboot/common.c@79 PS3, Line 79: if (wd) Same applies here, wd cannot be NULL.
https://review.coreboot.org/#/c/32290/3/src/soc/intel/broadwell/ramstage.c File src/soc/intel/broadwell/ramstage.c:
https://review.coreboot.org/#/c/32290/3/src/soc/intel/broadwell/ramstage.c@3... PS3, Line 35: return 0; I don't know this code, but if this was written in a way that always expected CBMEM_ID_POWER_STATE to be found here, the correct fix is probably to add an assert() rather than to silently return if it's missing.
https://review.coreboot.org/#/c/32290/3/util/cbfstool/cbfs_sections.c File util/cbfstool/cbfs_sections.c:
https://review.coreboot.org/#/c/32290/3/util/cbfstool/cbfs_sections.c@68 PS3, Line 68: if (!list_node) You should print an ERROR() here before you return.