From a22a5da40d7c81ebf3ebb26b457439712f5dde56 Mon Sep 17 00:00:00 2001 From: Karl Fessel Date: Wed, 9 Feb 2022 03:21:54 +0100 Subject: [PATCH] Correct RIOT os_mmap size type to size_t (#1002) Change signature of riot `os_mmap` implementation to match declaration in core/shared/platform/include/platform_api_vmcore.h --- core/shared/platform/riot/riot_platform.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/shared/platform/riot/riot_platform.c b/core/shared/platform/riot/riot_platform.c index bad69076..82a84639 100644 --- a/core/shared/platform/riot/riot_platform.c +++ b/core/shared/platform/riot/riot_platform.c @@ -44,9 +44,11 @@ os_free(void *ptr) } void * -os_mmap(void *hint, unsigned int size, int prot, int flags) +os_mmap(void *hint, size_t size, int prot, int flags) { - return BH_MALLOC(size); + if (size > ((unsigned)~0)) + return NULL; + return BH_MALLOC((unsigned)size); } void