aboutsummaryrefslogtreecommitdiff
path: root/src/wasmrt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasmrt.c')
-rw-r--r--src/wasmrt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wasmrt.c b/src/wasmrt.c
index 2fda952..3074a75 100644
--- a/src/wasmrt.c
+++ b/src/wasmrt.c
@@ -126,7 +126,10 @@ uint32_t wasm_rt_memory_load32_unchecked(struct wasm_rt_memory_t const *mem,
size_t wasm_rt_memory_loada(struct wasm_rt_memory_t const *mem, uint32_t addr,
char *buf, size_t sz) {
// This is overly pessimistic in case we try to load a string at the
- // end of our memory region, but it is OK for now.
+ // end of our memory region, and cause the bounds check to fail for
+ // a valid string that ends before the end of the buffer. This does
+ // not appear to be an issue for now, and can be implemented more
+ // more correctly in case we ever run into issues.
wasm_rt_memory_check(mem, addr, sz);
return wasm_rt_memory_loada_unchecked(mem, addr, buf, sz);
}