Commit 73789a3d authored by Bruce Leonard's avatar Bruce Leonard Committed by Artem Bityutskiy

UBI: fix 64-bit calculations

Signed-off-by: default avatarBruce Leonard <brucle@selinc.com>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment