]> git.baikalelectronics.ru Git - uboot.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)
commitaf46f2a86ae9c0b4360eaed3c9346b60984e7a2b
tree5fc8c90e9205fce29a46d7eef8e6cfe9129cddf9
parent6eb47c0555e066d3291b8752b249b190280e7beb
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