HomeFreeBSD

copy_file_range(2): Fix for small values of input file offset and len

Description

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.

(cherry picked from commit a5f9fe2bab789f49e8b53da3a62dbd34725e23ea)

Details

Provenance
rmacklemAuthored on Mar 1 2021, 2:28 PM
Parents
rG17cc6689eb16: MFC 9febbc454190:
Branches
Unknown
Tags
Unknown