On Sat, Sep 02, 2017 at 08:15:36AM -0700, Bin Meng wrote: > "lbas" with type "u16" (16 bits, unsigned) is promoted in > "lbas << ns->lba_shift" to type "int" (32 bits, signed), then > sign-extended to type "unsigned long long" (64 bits, unsigned). > If "lbas << ns->lba_shift" is greater than 0x7FFFFFFF, the upper > bits of the result will all be 1. > > Fix it by casting "lbas" to "u32". > > Reported-by: Coverity (CID: 166730) > Signed-off-by: Bin Meng <[email protected]> > Reviewed-by: Tom Rini <[email protected]>
Applied to u-boot/master, thanks! -- Tom
signature.asc
Description: Digital signature
_______________________________________________ U-Boot mailing list [email protected] https://lists.denx.de/listinfo/u-boot

