coreboot-kgpe-d16/util/romcc
Jacob Garber 9b0d8e7a1f util/romcc: Prevent out-of-bounds read
If 'class > LAST_REGC', then there will be an out-of-bounds read when
accessing 'regcm_bound'. Prevent this by skipping to the next iteration
of the loop. Note that this should not generally happen anyway, since
'result' represents a bitset for the indices of 'regcm_bound', and so
iterations where 'class > LAST_REGC' should already be skipped by the
previous continue statement (since those bits of 'result' should all be
zero).

Found-by: Covericy CID 1129122
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Change-Id: Id5f5adb0a292763251054aeecf2a5b87a11297b1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32902
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2019-05-22 10:03:11 +00:00
..
results
tests util/romcc: Fix parsing of empty string literal 2019-05-21 09:28:36 +00:00
COPYING
Makefile romcc: Remove old test infrastructure, rework Makefile 2016-04-14 19:13:07 +02:00
description.md util: Add description.md to each util 2018-07-26 13:26:50 +00:00
romcc.1 romcc.1: Point bug reporters to the coreboot ML / bug tracker 2016-05-01 16:29:09 +02:00
romcc.c util/romcc: Prevent out-of-bounds read 2019-05-22 10:03:11 +00:00
test.sh romcc: Remove old test infrastructure, rework Makefile 2016-04-14 19:13:07 +02:00