John Zhao uploaded patch set #2 to this change.

View Change

src/device: Prevent attack on null pointer dereference

Clang Static Analyzer version 8.0.0 detects access to field dev results
in a dereference of a null pointer which is loaded from variable bus.
Add sanity check for pointer bus to prevent null pointer dereference.

TEST=Built and boot up to kernel.

Change-Id: I084906c33065eaa834f50c545efcfab620658ec9
Signed-off-by: John Zhao <john.zhao@intel.com>
---
M src/device/device.c
1 file changed, 6 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/01/33101/2

To view, visit change 33101. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I084906c33065eaa834f50c545efcfab620658ec9
Gerrit-Change-Number: 33101
Gerrit-PatchSet: 2
Gerrit-Owner: John Zhao <john.zhao@intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: newpatchset