From d85a065cc7f95081032ebe32ab66bbc53b828f32 Mon Sep 17 00:00:00 2001 From: Xu Jun <693788454@qq.com> Date: Thu, 16 Jun 2022 19:15:18 +0800 Subject: [PATCH] address PR comments --- core/iwasm/aot/aot_loader.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/iwasm/aot/aot_loader.c b/core/iwasm/aot/aot_loader.c index 92027836c..d6560cccb 100644 --- a/core/iwasm/aot/aot_loader.c +++ b/core/iwasm/aot/aot_loader.c @@ -149,11 +149,11 @@ GET_U64_FROM_ADDR(uint32 *addr) #define read_uint32(p, p_end, res) TEMPLATE_READ(p, p_end, res, uint32) #define read_uint64(p, p_end, res) TEMPLATE_READ(p, p_end, res, uint64) -#define read_byte_array(p, p_end, addr, len) \ - do { \ - CHECK_BUF(p, p_end, len); \ - bh_memcpy_s(addr, p_end - p, p, len); \ - p += len; \ +#define read_byte_array(p, p_end, addr, len) \ + do { \ + CHECK_BUF(p, p_end, len); \ + bh_memcpy_s(addr, len, p, len); \ + p += len; \ } while (0) #define read_string(p, p_end, str) \