Evgeny Zinoviev has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/48361 )
Change subject: Fix segfault when iomem=strict ......................................................................
Fix segfault when iomem=strict
As I can see, physmap_common() only returns ERROR_PTR or a real pointer but never NULL.
Tested on Linux 5.9.12.
Change-Id: I5b11957fc10fd5c7a4fbb7f54fb94d791590f373 Signed-off-by: Evgeny Zinoviev me@ch1p.io --- M dmi.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/61/48361/1
diff --git a/dmi.c b/dmi.c index c44221c..7488d61 100644 --- a/dmi.c +++ b/dmi.c @@ -164,7 +164,7 @@ unsigned int i = 0, j = 0;
uint8_t *dmi_table_mem = physmap_ro("DMI Table", base, len); - if (dmi_table_mem == NULL) { + if (dmi_table_mem == ERROR_PTR) { msg_perr("Unable to access DMI Table\n"); return; }