Thejaswani Putta has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32290
Change subject: Klocwork: Fix the Null pointer derefernce found by klocwork ......................................................................
Klocwork: Fix the Null pointer derefernce found by klocwork
Signed-off-by: Thejaswani Putta thejaswani.putta@intel.com Change-Id: I15973ac28e9645826986cf63d2160eedb83024e4 --- M src/lib/coreboot_table.c 1 file changed, 5 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/32290/1
diff --git a/src/lib/coreboot_table.c b/src/lib/coreboot_table.c index 6e44f5d..808cfa7 100644 --- a/src/lib/coreboot_table.c +++ b/src/lib/coreboot_table.c @@ -233,8 +233,11 @@ vbwb = (struct lb_range *)lb_new_record(header); vbwb->tag = LB_TAB_VBOOT_WORKBUF; vbwb->size = sizeof(*vbwb); - vbwb->range_start = (uintptr_t)wd + wd->buffer_offset; - vbwb->range_size = wd->buffer_size; + if(wd) + { + vbwb->range_start = (uintptr_t)wd + wd->buffer_offset; + vbwb->range_size = wd->buffer_size; + } }
__weak uint32_t board_id(void) { return UNDEFINED_STRAPPING_ID; }