mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
698f05ab95
commit
d712b799b5
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Reference in a new issue