summaryrefslogtreecommitdiff
path: root/src/mainboard/google/kukui
diff options
context:
space:
mode:
authorJacob Garber <jgarber1@ualberta.ca>2019-06-25 12:46:35 -0600
committerMartin Roth <martinroth@google.com>2019-07-16 16:27:22 +0000
commita9bf88b883e31f2455cbbbd292c41e43fe4b373b (patch)
tree9c72795e351e702bc39e46f0b3501798f9d5df44 /src/mainboard/google/kukui
parent198c2e63ac964364158366468f8db5f8390494c0 (diff)
sb/amd/{cimx,}/sb{700,800,900}: Prevent uninitialized reads
There are two hard things in computer science: cache invalidation, naming things, and off-by-one errors. -- Anonymous var_num records the number of initialized entries in the reg_var array. However, this means the index of the last initialized element is one less than the value of var_num, so we need to take that into account when indexing into the array. This has already been fixed in several other places (eg. sb/amd/pi/hudson/lpc.c), so let's also do so here. Change-Id: Ibefabaca42866a3f2b22eff979c73badf86ac317 Signed-off-by: Jacob Garber <jgarber1@ualberta.ca> Found-by: scan-build 8.0.0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/33790 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/mainboard/google/kukui')
0 files changed, 0 insertions, 0 deletions