coreboot/src/northbridge
Martin Roth a63c96bf03 UPSTREAM: nb/intel/i82810: Make sure DIMM size isn't negative
If smbus_read_byte returned an error when reading the DIMM size,
this value would be used as an offset into an array.

Check for the error, and set the DIMM size to 0 if there's
a problem.

Addresses coverity issue 1229658 - Negative array index read

Signed-off-by: Martin Roth <martinroth@google.com>
BUG=None
BRANCH=None
TEST=None

Reviewed-on: https://review.coreboot.org/17485
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>

Change-Id: I6461a0fae819dd9261adbb411c4bba07520d076d
Reviewed-on: https://chromium-review.googlesource.com/415067
Commit-Ready: Aaron Durbin <adurbin@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-29 17:39:16 -08:00
..
amd UPSTREAM: spi: Clean up SPI flash driver interface 2016-11-29 17:38:45 -08:00
intel UPSTREAM: nb/intel/i82810: Make sure DIMM size isn't negative 2016-11-29 17:39:16 -08:00
via UPSTREAM: Remove explicit select MMCONF_SUPPORT 2016-11-29 17:38:33 -08:00