about summary refs log tree commit diff
path: root/src/mman/madvise.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2013-06-29 00:02:38 -0400
committerRich Felker <dalias@aerifal.cx>2013-06-29 00:02:38 -0400
commit17aef0b41e3d7cb37c476cbe2df26fc444518a64 (patch)
treec72587f4b27cab646b00c9953e0ae9a1b180b202 /src/mman/madvise.c
parent062f40ef3e56021f4a9902095867e35cce6d99c4 (diff)
downloadmusl-17aef0b41e3d7cb37c476cbe2df26fc444518a64.tar.gz
musl-17aef0b41e3d7cb37c476cbe2df26fc444518a64.tar.xz
musl-17aef0b41e3d7cb37c476cbe2df26fc444518a64.zip
prevent shmget from allocating objects that overflow ptrdiff_t
rather than returning an error, we have to increase the size argument
so high that the kernel will have no choice but to fail. this is
because POSIX only permits the EINVAL error for size errors when a new
shared memory segment would be created; if it already exists, the size
argument must be ignored. unfortunately Linux is non-conforming in
this regard, but I want to keep the code correct in userspace anyway
so that if/when Linux is fixed, the behavior applications see will be
conforming.
Diffstat (limited to 'src/mman/madvise.c')
0 files changed, 0 insertions, 0 deletions