summaryrefslogtreecommitdiff
path: root/ubi-utils/src/ubinfo.c
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2010-11-10 22:31:41 -0800
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-11-13 13:53:07 +0200
commita188ff405000902139a46d9e3753cae0e1168d46 (patch)
tree25e7034e4b674e555875fa2c50fb6058abca0cf0 /ubi-utils/src/ubinfo.c
parenta3d86d1d7679d082ba2b28b4ad2c57a4dd362df3 (diff)
mtd-utils: nandwrite: prevent 32-bit overflow
For large block- and page-sizes, the multiplication of ebsize_aligned and pagelen can overflow a 32-bit integer. This overflow can be prevented by a simple change in order of operations (i.e., do division first). Since ebsize_aligned is always a multiple of mtd.min_io_size, this produces no change in results. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'ubi-utils/src/ubinfo.c')
0 files changed, 0 insertions, 0 deletions