summaryrefslogtreecommitdiff
path: root/tests/typ
diff options
context:
space:
mode:
authorArnaud Golfouse <53786772+arnaudgolfouse@users.noreply.github.com>2023-09-26 16:21:21 +0200
committerGitHub <noreply@github.com>2023-09-26 16:21:21 +0200
commit962071619d70975878fe93964422f0d0ed93945d (patch)
treec8161e3d3e48c7c23a472733113d4b62dd93369a /tests/typ
parent2fd0291a8180cba8a6d503229eeef7bd1b744796 (diff)
Avoid plugin panics (#2232)
Diffstat (limited to 'tests/typ')
-rw-r--r--tests/typ/compiler/plugin-oob.typ14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/typ/compiler/plugin-oob.typ b/tests/typ/compiler/plugin-oob.typ
new file mode 100644
index 00000000..4bc16212
--- /dev/null
+++ b/tests/typ/compiler/plugin-oob.typ
@@ -0,0 +1,14 @@
+// Test Out Of Bound read/write in WebAssembly plugins communication.
+// Ref: false
+
+---
+#let p = plugin("/files/plugin-oob.wasm")
+
+// Error: 2-14 plugin tried to read out of bounds: pointer 0x40000000 is out of bounds for read of length 1
+#p.read_oob()
+
+---
+#let p = plugin("/files/plugin-oob.wasm")
+
+// Error: 2-27 plugin tried to write out of bounds: pointer 0x40000000 is out of bounds for write of length 3
+#p.write_oob(bytes("xyz"))