mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-30 08:31:03 +00:00
imx: nandbcb: Fix potential overflow in fill_dbbt_data
Fix Coverity Issue 9006658. In fill_dbbt_data, 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
f637c40dd7
commit
983f5e0391
1 changed files with 1 additions and 1 deletions
|
@ -476,7 +476,7 @@ static int fill_dbbt_data(struct mtd_info *mtd, void *buf, int num_blocks)
|
|||
u32 *n_bad_blocksp = buf + 0x4;
|
||||
|
||||
for (n = 0; n < num_blocks; n++) {
|
||||
loff_t offset = n * mtd->erasesize;
|
||||
loff_t offset = (loff_t)n * mtd->erasesize;
|
||||
if (mtd_block_isbad(mtd, offset)) {
|
||||
n_bad_blocks++;
|
||||
*bb = n;
|
||||
|
|
Loading…
Reference in a new issue