Attention is currently required from: Angel Pons.
Nico Huber would like Angel Pons to review this change.
dmi: Correctly check for ERROR_PTR
For the physmap*() functions, NULL is considered valid return value.
Fixes a segmentation fault when DMI tables can't be mapped.
Tested on intel/eblake board with broken coreboot.
Change-Id: Ic403c2940c2b91acbd113f0acfa3ce9ef6c6bb6c
Signed-off-by: Nico Huber <nico.h@gmx.de>
---
M dmi.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/13/62613/1
diff --git a/dmi.c b/dmi.c
index 79321ce..cea07f8 100644
--- a/dmi.c
+++ b/dmi.c
@@ -164,7 +164,7 @@
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;
}
To view, visit change 62613. To unsubscribe, or for help writing mail filters, visit settings.