]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
copy_file_range(2): Fix for small values of input file offset and len
authorRick Macklem <rmacklem@FreeBSD.org>
Mon, 1 Mar 2021 14:28:30 +0000 (06:28 -0800)
committerRick Macklem <rmacklem@FreeBSD.org>
Wed, 3 Mar 2021 15:40:39 +0000 (07:40 -0800)
commit2d379aed1e5c52956c5257d286a781e9a32e68b3
tree3acca66f32a4adea0c9fa1ec52a7f891e1fcca5d
parent20f9e2a723f5f560d6219e28f36dd3b8f8561b3a
copy_file_range(2): Fix for small values of input file offset and len

r366302 broke copy_file_range(2) for small values of
input file offset and len.

It was possible for rem to be greater than len and then
"len - rem" was a large value, since both variables are
unsigned.

Approved by: re (gjb)

(cherry picked from commit a5f9fe2bab789f49e8b53da3a62dbd34725e23ea)
sys/kern/vfs_vnops.c