Jacob Garber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33154
Change subject: mb/google/link: Prevent null pointer dereference ......................................................................
mb/google/link: Prevent null pointer dereference
Only check the lastidread if there is one.
Change-Id: I81248192fe52b2d536976385715bc54aa73d450c Signed-off-by: Jacob Garber jgarber1@ualberta.ca Found-by: Coverity CID 1375985 --- M src/mainboard/google/link/i915.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/54/33154/1
diff --git a/src/mainboard/google/link/i915.c b/src/mainboard/google/link/i915.c index 12d424c..35a30c9 100644 --- a/src/mainboard/google/link/i915.c +++ b/src/mainboard/google/link/i915.c @@ -173,7 +173,7 @@ if (verbose & vio) printk(BIOS_SPEW, "\texpect %08lx\n", id->data); /* we're looking for something. */ - if (lastidread->addr == id->addr){ + if ((lastidread != NULL) && (lastidread->addr == id->addr)) { /* they're going to be polling. * just do it 1000 times */
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33154 )
Change subject: mb/google/link: Prevent null pointer dereference ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/33154/1/src/mainboard/google/link/i915.c File src/mainboard/google/link/i915.c:
https://review.coreboot.org/#/c/33154/1/src/mainboard/google/link/i915.c@176 PS1, Line 176: if ((lastidread != NULL) && (lastidread->addr == id->addr)) { line over 80 characters
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33154 )
Change subject: mb/google/link: Prevent null pointer dereference ......................................................................
Patch Set 1: Code-Review+2
Matt DeVillier has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33154 )
Change subject: mb/google/link: Prevent null pointer dereference ......................................................................
Patch Set 1:
semi-related -- is there a reason to keep Link's old NGI code around? libgfxinit works at least as well, and we've removed the old C NGI code for most other boards now supported by libgfxinit
Jacob Garber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33154 )
Change subject: mb/google/link: Prevent null pointer dereference ......................................................................
Patch Set 1:
Patch Set 1:
semi-related -- is there a reason to keep Link's old NGI code around? libgfxinit works at least as well, and we've removed the old C NGI code for most other boards now supported by libgfxinit
No, there's not, Nico already deleted it :) https://review.coreboot.org/c/coreboot/+/33128
Jacob Garber has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/33154 )
Change subject: mb/google/link: Prevent null pointer dereference ......................................................................
Abandoned
Superseded by https://review.coreboot.org/c/coreboot/+/33128