amd/{hudson,stoneyridge}: fix out of bounds read
commit4195b10d5267d7b48fc57cb9a50d6d6f48d73439
authorRichard Spiegel <richard.spiegel@silverbackltd.com>
Tue, 28 Nov 2017 13:54:02 +0000 (28 06:54 -0700)
committerMartin Roth <martinroth@google.com>
Thu, 30 Nov 2017 18:35:53 +0000 (30 18:35 +0000)
tree908f8069f6b16880fcb3372ccdf391875e19113b
parentb077b91e60d58e528181b9e874cc222474ee60cd
amd/{hudson,stoneyridge}: fix out of bounds read

southbridge/amd/pi/hudson/imc.c procedure enable_imc_thermal_zone was
identified by coverity as having out of bounds access. Copies of the
procedure are present in southbridge/amd/agesa/hudson/imc.c and in
soc/amd/stoneyridge/imc.c. Fix the procedure in all 3 files.

Fixes coverity CID 1260807: Out-of-bounds read.

BUG=b:69835834
TEST=Build and platform boot to OS

Change-Id: Ic16edc607358b9a688151735e6fcb3393d3bce80
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/22619
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
src/soc/amd/stoneyridge/imc.c
src/southbridge/amd/agesa/hudson/imc.c
src/southbridge/amd/pi/hudson/imc.c