diff --git a/src/wasm2c_rt_mem.c b/src/wasm2c_rt_mem.c index 1bdf6f7..c13568e 100644 --- a/src/wasm2c_rt_mem.c +++ b/src/wasm2c_rt_mem.c @@ -328,8 +328,8 @@ static void* os_mmap(void* hint, size_t size, int prot, int flags) /* integer overflow */ return NULL; - if (request_size > 16 * (uint64_t)UINT32_MAX) - /* At most 16 G is allowed */ + if (request_size > 4 * (uint64_t)UINT32_MAX) + /* Sanity check: At most 16 G is allowed */ return NULL; if (prot & MMAP_PROT_READ)