Heinrich Schuchardt 947d4f132b regmap: fix range checks
On the 32bit ARM sandbox 'dm ut dm_test_devm_regmap' fails with an abort.
This is due to incorrect range checks.

On 32-bit systems the size of size_t and int is both 32 bit. The expression
(offset + val_len) is bound to overflow if offset == -1. Add an overflow
check.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-06 22:54:56 +02:00
..
2022-06-28 03:09:52 +01:00
2022-07-26 02:30:56 -06:00
2022-05-02 09:58:13 -04:00
2022-10-06 22:54:56 +02:00