]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_io: fix signed comparison problem in copy_file_range
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 1 Jun 2018 00:38:54 +0000 (19:38 -0500)
committerEric Sandeen <sandeen@redhat.com>
Fri, 1 Jun 2018 00:38:54 +0000 (19:38 -0500)
commitcb1b013b265e0e4f13b7a2d2a06dbd39091cc05f
tree27156ae021bff6b16a26051b400286916603a531
parenta023e1af046c190c9782b2ecd814cd28bcdb4e39
xfs_io: fix signed comparison problem in copy_file_range

cvtnum() returns a signed long long, so the type of 'len' should be a
signed type so that a user entering a negative length doesn't produce
some huge positive integer.  The negative len check demands it anyway.

Coverity-id: 1435895
Fixes: 25b4549 ("xfs_io: Make copy_range arguments understand *iB values")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
io/copy_file_range.c