cr suggestions

This commit is contained in:
TL
2025-02-24 21:20:07 +00:00
committed by Marcin Kolny
parent dfcadc6202
commit 2e4ebfb20a
3 changed files with 25 additions and 11 deletions
+3 -2
View File
@@ -39,9 +39,10 @@ os_mmap(void *hint, size_t size, int prot, int flags, os_file_handle file)
page_size = os_getpagesize();
request_size = (size + page_size - 1) & ~(page_size - 1);
if (request_size < size)
/* integer overflow */
if (request_size < size) {
printf("mmap failed: request size overflow due to paging\n");
return NULL;
}
#if WASM_ENABLE_JIT != 0
/**