summaryrefslogtreecommitdiff
path: root/chipset_enable.c
diff options
context:
space:
mode:
authorEdward O'Callaghan <quasisec@google.com>2022-02-02 17:15:05 +1100
committerNico Huber <nico.h@gmx.de>2022-02-03 22:27:51 +0000
commitc26f27bef8cde6249dab86f4d46943260734793e (patch)
treeea4c66cbfaac85dd866bd1b0d63c396ef5b2b1ab /chipset_enable.c
parentac68a9e2a8766604efb9d6dfacee59590dcacce5 (diff)
downloadflashrom-git-c26f27bef8cde6249dab86f4d46943260734793e.tar.gz
fmap.c: Avoid undefined behaviour with fmap_lsearch([len:=0])
Calling libflashrom entry-points that internally dispatch to fmap_lsearch() can result in a integer overflow. Therefore validate the length paramter before attempting to use it. BUG=none TEST=`make` Change-Id: Ifb408c55c3b69ddff453dcc704b7389298050473 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Spotted-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/61545 Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'chipset_enable.c')
0 files changed, 0 insertions, 0 deletions