Commit 9b458e8
mtd: diskonchip: Cast an operand to prevent potential overflow
There may be a potential integer overflow issue in inftl_partscan().
parts[0].size is defined as "uint64_t" while mtd->erasesize and
ip->firstUnit are defined as 32-bit unsigned integer. The result of
the calculation will be limited to 32 bits without correct casting.
Fixes: 1da177e ("Linux-2.6.12-rc2")
Signed-off-by: Zichen Xie <[email protected]>
Cc: [email protected]
Signed-off-by: Miquel Raynal <[email protected]>1 parent d8e4771 commit 9b458e8
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1098 | 1098 | | |
1099 | 1099 | | |
1100 | 1100 | | |
1101 | | - | |
| 1101 | + | |
1102 | 1102 | | |
1103 | 1103 | | |
1104 | 1104 | | |
| |||
0 commit comments