The data type returned by vmoff() is too narrow in its range. This could
break the transmission of files longer than 4 GB on 32-bit architectures. Reviewed by: glebius, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D10019
This commit is contained in:
parent
d8402b7b53
commit
67796e3a06
@ -207,12 +207,12 @@ xfsize(int i, int n, off_t off, off_t len)
|
||||
/*
|
||||
* Helper function to get offset within object for i page.
|
||||
*/
|
||||
static inline vm_offset_t
|
||||
static inline vm_ooffset_t
|
||||
vmoff(int i, off_t off)
|
||||
{
|
||||
|
||||
if (i == 0)
|
||||
return ((vm_offset_t)off);
|
||||
return ((vm_ooffset_t)off);
|
||||
|
||||
return (trunc_page(off + i * PAGE_SIZE));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user