提交 73789a3d 编写于 作者: B Bruce Leonard 提交者: Artem Bityutskiy

UBI: fix 64-bit calculations

Signed-off-by: NBruce Leonard <brucle@selinc.com>
Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
上级 23add745
......@@ -437,7 +437,8 @@ static int vol_cdev_ioctl(struct inode *inode, struct file *file,
break;
}
rsvd_bytes = vol->reserved_pebs * (ubi->leb_size-vol->data_pad);
rsvd_bytes = (long long)vol->reserved_pebs *
ubi->leb_size-vol->data_pad;
if (bytes < 0 || bytes > rsvd_bytes) {
err = -EINVAL;
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册