Re: [PATCH 1/1] cmd: mtd: avoid unintentional integer overflow

2024-01-10 Thread Miquel Raynal
Hi Heinrich, heinrich.schucha...@canonical.com wrote on Thu, 11 Jan 2024 08:31:55 +0100: > mtd dump beyond 4 GiB will show incorrect results. > > Multiplying two u32 will yield a u32. Add a missing cast. Good point, thanks for the fix. Reviewed-by: Miquel Raynal Thanks, Miquèl

[PATCH 1/1] cmd: mtd: avoid unintentional integer overflow

2024-01-10 Thread Heinrich Schuchardt
mtd dump beyond 4 GiB will show incorrect results. Multiplying two u32 will yield a u32. Add a missing cast. Fixes: 5db66b3aee6f ("cmd: mtd: add 'mtd' command") Addresses-Coverity-ID: 477205 ("Unintentional integer overflow") Signed-off-by: Heinrich Schuchardt --- cmd/mtd.c | 4 ++-- 1 file cha