Add more operand stack overflow checks for fast-interp (#1104)

And clear some compile warnings on Windows
This commit is contained in:
Wenyong Huang
2022-04-20 16:19:12 +08:00
committed by GitHub
parent 0f505aafd9
commit d6e781af28
5 changed files with 29 additions and 11 deletions

View File

@ -3501,8 +3501,8 @@ wasm_loader_emit_const(WASMLoaderContext *ctx, void *value, bool is_32_bit)
bh_assert(((uintptr_t)ctx->p_code_compiled & 1) == 0);
#endif
bh_memcpy_s(ctx->p_code_compiled,
ctx->p_code_compiled_end - ctx->p_code_compiled, value,
size);
(uint32)(ctx->p_code_compiled_end - ctx->p_code_compiled),
value, size);
ctx->p_code_compiled += size;
}
else {