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
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
vm_mmap.c | ||
---|---|---|
261 | 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.