mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-09-25 07:41:40 +02:00
imx: nandbcb: Fix potential overflow in nandbcb_set_boot_config
Fix Coverity Issue 9006656. In nandbcb_set_boot_config, an integer overflow occurs, with the result converted to a wider integer type. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
parent
983f5e0391
commit
233b0b070e
@ -275,7 +275,8 @@ static int nandbcb_set_boot_config(int argc, char * const argv[],
|
||||
boot_stream1_address);
|
||||
|
||||
if (boot_cfg->secondary_boot_stream_off_in_MB)
|
||||
boot_stream2_address = boot_cfg->secondary_boot_stream_off_in_MB * 1024 * 1024;
|
||||
boot_stream2_address =
|
||||
(loff_t)boot_cfg->secondary_boot_stream_off_in_MB * 1024 * 1024;
|
||||
|
||||
max_boot_stream_size = boot_stream2_address - boot_stream1_address;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user