Skip to content
Commit bae12df9 authored by Denis Efremov's avatar Denis Efremov Committed by David Sterba
Browse files

btrfs: use kvcalloc for allocation in btrfs_ioctl_send()



Replace kvzalloc() call with kvcalloc() that also checks the size
internally. There's a standalone overflow check in the function so we
can return invalid parameter combination.  Use array_size() helper to
compute the memory size for clone_sources_tmp.

Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: default avatarDenis Efremov <efremov@linux.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 8eb2fd00
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment