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-04-25 09:25:00 +02:00
2022-09-25 08:30:05 -06:00
2022-09-25 08:30:05 -06:00
2022-10-06 22:54:56 +02:00
2022-09-29 16:11:31 -04:00
2021-10-05 08:50:15 -04:00
2022-09-16 11:05:16 -04:00
2022-08-04 16:18:47 -04:00
2022-10-03 15:39:46 -04:00
2022-01-13 07:57:49 -05:00
2022-09-25 08:30:05 -06:00
2022-01-13 07:57:49 -05:00
2022-09-29 16:11:31 -04:00
2022-09-19 16:07:12 -04:00
2022-09-29 16:11:31 -04:00
2022-09-19 16:07:12 -04:00
2022-09-19 16:07:12 -04:00
2022-09-16 11:05:16 -04:00
2022-09-03 16:59:05 +03:00
2022-05-03 21:39:22 +02:00
2022-10-03 15:39:46 -04:00
2022-09-25 08:30:05 -06:00
2021-10-01 21:08:18 -04:00
2022-10-03 15:39:46 -04:00
2022-09-25 08:30:05 -06:00
2022-09-16 11:05:16 -04:00