A user reported a bug where we do sizeof(*ptr * count) instead of sizeof(*ptr) *
count. Fix this.
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
---
fs/btrfs/send.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index ff40f1c..7c8964b 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -4587,8 +4587,8 @@ long btrfs_ioctl_send(struct file *mnt_file, void __user
*arg_)
}
if (!access_ok(VERIFY_READ, arg->clone_sources,
- sizeof(*arg->clone_sources *
- arg->clone_sources_count))) {
+ sizeof(*arg->clone_sources) *
+ arg->clone_sources_count)) {
ret = -EFAULT;
goto out;
}
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs"
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html