smbd/smb2_ioctl: validate dup_extent request lengths
authorDavid Disseldorp <ddiss@samba.org>
Sat, 1 Oct 2016 21:40:13 +0000 (23:40 +0200)
committerRalph Boehme <slow@samba.org>
Wed, 10 May 2017 06:22:19 +0000 (08:22 +0200)
commitb97d8c81a7d4be7ba4e050dea4c963645721132c
tree9dd18231dd54c229dd28429e4eebcb7980972c22
parentfb31e359bf8e80ece6641bc1a7e6a1e2a5e67ddb
smbd/smb2_ioctl: validate dup_extent request lengths

FSCTL_DUPLICATE_EXTENTS_TO_FILE has some interesting behaviour when
exceeding the destination file length - the clone is truncated to only
cover the existing file region. If the existing length is zero, then
nothing is cloned.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
source3/smbd/smb2_ioctl_filesys.c