]> git.dujemihanovic.xyz Git - u-boot.git/commit
test: Fix pointer overrun in dm_test_devm_regmap()
authorAndrew Scull <ascull@google.com>
Sun, 3 Apr 2022 10:39:14 +0000 (10:39 +0000)
committerTom Rini <trini@konsulko.com>
Fri, 29 Apr 2022 15:11:36 +0000 (11:11 -0400)
commit7f58feae3fba07c349fe57e86ce8bd5cc2198f58
tree5fc8c90e9205fce29a46d7eef8e6cfe9129cddf9
parent49209da54f9580c80e96b5a33351d24d59599926
test: Fix pointer overrun in dm_test_devm_regmap()

This tests calls regmap_read() which takes a uint pointer as an output
parameter. The test was passing a pointer to a u16 which resulted in an
overflow when the output was written. Fix this by following the
regmap_read() API and passing a uint pointer instead.

Signed-off-by: Andrew Scull <ascull@google.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
Cc: Pratyush Yadav <p.yadav@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
test/dm/regmap.c