Commit 1ce65edb authored by rwbarton's avatar rwbarton Committed by thoughtpolice
Browse files

Paranoid integer overflow check in my_mmap


Signed-off-by: thoughtpolice's avatarAustin Seipp <aseipp@pobox.com>
parent 48865521
......@@ -79,6 +79,9 @@ my_mmap (void *addr, W_ size)
{
void *ret;
if (size > (W_)SIZE_MAX)
barf("my_mmap: impossibly large allocation of %" FMT_Word " bytes; W_ larger than size_t?", size);
#if defined(solaris2_HOST_OS) || defined(irix_HOST_OS)
{
int fd = open("/dev/zero",O_RDONLY);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment