projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e47212
)
mtd: mtdswap: fix integer overflow
author
Brian Norris
<computersforpeace@gmail.com>
Tue, 22 Jul 2014 02:07:02 +0000
(19:07 -0700)
committer
Brian Norris
<computersforpeace@gmail.com>
Tue, 19 Aug 2014 18:53:08 +0000
(11:53 -0700)
Caught by Coverity.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/mtdswap.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/mtd/mtdswap.c
b/drivers/mtd/mtdswap.c
index 0ec96cd5dc784d3fd0636d6331d88152bcaafb78..48cf6f98df449f5fba4ab8220cbbf2536ca633aa 100644
(file)
--- a/
drivers/mtd/mtdswap.c
+++ b/
drivers/mtd/mtdswap.c
@@
-1474,7
+1474,7
@@
static void mtdswap_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
}
eblocks = mtd_div_by_eb(use_size, mtd);
- use_size = eblocks * mtd->erasesize;
+ use_size =
(uint64_t)
eblocks * mtd->erasesize;
bad_blocks = mtdswap_badblocks(mtd, use_size);
eavailable = eblocks - bad_blocks;