mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-08 13:50:20 +00:00
msync rounded start + length up to the page size before checking the length, so a length close to SIZE_MAX wrapped to a small or zero size and the call succeeded on a mapped address instead of failing. mincore already guards the same rounding. Check the length against the remaining address space, including the offset into the first page and the page mask, before computing the size, and fail with EINVAL.