[PATCH 1/1] regmap: fix range checks

Tom Rini trini at konsulko.com
Wed Oct 12 21:14:13 CEST 2022


On Thu, Sep 29, 2022 at 10:27:06PM +0000, Heinrich Schuchardt wrote:

> 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 <xypron.glpk at gmx.de>
> Reviewed-by: Simon Glass <sjg at chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20221012/b3ebe0c6/attachment.sig>


More information about the U-Boot mailing list