diff options
author | Dongsheng Yang <yangds.fnst@cn.fujitsu.com> | 2015-06-29 16:49:19 +0800 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2015-07-06 14:42:38 -0700 |
commit | e76eeca21de23ae884e415a12809ac683960cbca (patch) | |
tree | 76d33ee51aea189b2d0a9d1c05d3af1dbadb11b9 /tests/ubi-tests/mkvol_bad.c | |
parent | eb3f8a53e92b250b1086b216da7049eff0bd4589 (diff) |
mtd-utils: ubi-tests: fix a some overflows
Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Reviewed-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'tests/ubi-tests/mkvol_bad.c')
-rw-r--r-- | tests/ubi-tests/mkvol_bad.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ubi-tests/mkvol_bad.c b/tests/ubi-tests/mkvol_bad.c index 27f4795..486fbab 100644 --- a/tests/ubi-tests/mkvol_bad.c +++ b/tests/ubi-tests/mkvol_bad.c @@ -106,7 +106,7 @@ static int test_mkvol(void) return -1; req.alignment = dev_info.leb_size - dev_info.min_io_size; - req.bytes = (dev_info.leb_size - dev_info.leb_size % req.alignment) * + req.bytes = (long long)(dev_info.leb_size - dev_info.leb_size % req.alignment) * dev_info.avail_lebs + 1; ret = ubi_mkvol(libubi, node, &req); if (check_failed(ret, ENOSPC, "ubi_mkvol", "bytes = %lld", req.bytes)) |