There are times when a len==0 parameter to mmap is okay. But on a 32-bit machine, a len parameter just a few bytes short of 4G, rounded up to a page boundary and hitting zero then, is not okay. Return failure in that case.
Details
Details
Peter Holm reported this problem, and reported that this change resolved it.
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
vm_mmap.c | ||
---|---|---|
261 ↗ | (On Diff #58457) | Why do you need the cast ? size already has size_t type, and vm_size_t is effectively an alias to it. |
Comment Actions
I think that it is likely that other, related system calls exhibit a similar misbehavior.