diff options
author | John Zhao <john.zhao@intel.com> | 2019-05-29 18:12:01 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-06-03 13:25:25 +0000 |
commit | 2deb5fb3b07e07ee3d0d142723e2a25f5982d417 (patch) | |
tree | e522061361efe4130f9df8693d7e902a42fd5f56 /src/mainboard/google/fizz/ec.c | |
parent | 62ddc491cf8c8c6412177d2866bec89c6f4906dc (diff) |
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>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/33101
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lijian Zhao <lijian.zhao@intel.com>
Diffstat (limited to 'src/mainboard/google/fizz/ec.c')
0 files changed, 0 insertions, 0 deletions