commit | 9aaf70ed2b3634eea296dd7b0f153f88e15eb034 | [log] [tgz] |
---|---|---|
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | Thu Sep 29 22:27:06 2022 +0000 |
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | Thu Oct 06 22:54:56 2022 +0200 |
tree | a071fa95199db1e53162b1bd6fae4e28c17692f5 | |
parent | 3a01e2eece069235c56bbb0d0dc84060143a778d [diff] |
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>