From b1034b86023672e6750da49b01a7d429cd8339d0 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Sat, 15 Nov 2025 18:50:55 +0100 Subject: Check memory linear accesses are within bounds WebAssembly defines how many pages of linear memory are owned by the instance on startup. This limit can then be bumped via the grow_memory operator. Therefore, accesses outside the defined bounds are considered an exception. --- private_include/nw/linear.h | 1 + 1 file changed, 1 insertion(+) (limited to 'private_include') diff --git a/private_include/nw/linear.h b/private_include/nw/linear.h index a316e77..cdd7eb0 100644 --- a/private_include/nw/linear.h +++ b/private_include/nw/linear.h @@ -17,5 +17,6 @@ enum nw_state nwp_linear_load(struct nw_interp *i, struct nw_sm_io *io, unsigned long offset); enum nw_state nwp_linear_store(struct nw_interp *i, struct nw_sm_io *io, unsigned long offset); +int nwp_linear_check(const struct nw_interp *i, unsigned long offset, size_t n); #endif -- cgit v1.2.3