summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorhuijin.park <huijin.park@samsung.com>2018-11-28 03:02:14 -0500
committerBoris Brezillon <boris.brezillon@bootlin.com>2018-12-10 21:59:07 +0100
commit84a1c2109d23df3543d96231c4fee1757299bb1a (patch)
treee025f78f761dd94e0a503ab52437e1c4b6f9b65d /block
parent4cc106f8f245bae0c458224804733240cb22394d (diff)
downloadlinux-84a1c2109d23df3543d96231c4fee1757299bb1a.tar.bz2
mtd: spi-nor: cast to u64 to avoid uint overflows
The "params->size" is defined as "u64". And "info->sector_size" and "info->n_sectors" are defined as unsigned int and u16. Thus, u64 data might have strange data(loss data) if the result overflows an unsigned int. This patch casts "info->sector_size" to an u64. Signed-off-by: huijin.park <huijin.park@samsung.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions