diff options
Diffstat (limited to 'src/wasmrt.h')
| -rw-r--r-- | src/wasmrt.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wasmrt.h b/src/wasmrt.h index 1bb8d95..e56d17e 100644 --- a/src/wasmrt.h +++ b/src/wasmrt.h @@ -208,6 +208,12 @@ uint32_t wasm_rt_memory_load32_unchecked(struct wasm_rt_memory_t const *mem, uint32_t addr); /** + * Loads a 32-bit word from memory, returning `false` if out of bounds. + */ +bool wasm_rt_memory_load32_checked(struct wasm_rt_memory_t const *mem, + uint32_t addr, uint32_t *value); + +/** * Loads a NUL-terminated string from memory. * * It copies at most `sz - 1` bytes and ensures that `buf` always ends with |
