diff --git a/lib/exec_insn_subr.c b/lib/exec_insn_subr.c index 54ea1624..3f94f282 100644 --- a/lib/exec_insn_subr.c +++ b/lib/exec_insn_subr.c @@ -68,7 +68,7 @@ memory_instance_getptr2(struct meminst *meminst, uint32_t ptr, uint32_t offset, } goto success; } - uint32_t last_byte = ea + (size - 1); + uint32_t last_byte; if (ADD_U32_OVERFLOW(ea, size - 1, &last_byte)) { goto do_trap; }