aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-wasm.c
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2023-10-11 20:37:42 +0000
committerstephan <stephan@noemail.net>2023-10-11 20:37:42 +0000
commit6a0f297da9ca464ec2586af3db3747af5c43970d (patch)
treecca2414f0639afbc1bdb4b3f8bcc18dcc9d642e0 /ext/wasm/api/sqlite3-wasm.c
parentac4aea5102e3a272f6cd8a601a35d2541733fa90 (diff)
downloadsqlite-6a0f297da9ca464ec2586af3db3747af5c43970d.tar.gz
sqlite-6a0f297da9ca464ec2586af3db3747af5c43970d.zip
Unconditionally force use of SQLITE_ENABLE_API_ARMOR in the WASM and JNI builds. Their corresponding test suites still work.
FossilOrigin-Name: c11394b50d0687b6d6abad9c80d5cd3cdce77e9b9c278f40601c460f463744a1
Diffstat (limited to 'ext/wasm/api/sqlite3-wasm.c')
-rw-r--r--ext/wasm/api/sqlite3-wasm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/wasm/api/sqlite3-wasm.c b/ext/wasm/api/sqlite3-wasm.c
index db77010d9..88a679c51 100644
--- a/ext/wasm/api/sqlite3-wasm.c
+++ b/ext/wasm/api/sqlite3-wasm.c
@@ -84,6 +84,14 @@
/**********************************************************************/
/* SQLITE_ENABLE_... */
+/*
+** Unconditionally enable API_ARMOR in the WASM build. It ensures that
+** public APIs behave predictable in the face of passing illegal NULLs
+** or ranges which might otherwise invoke undefined behavior.
+*/
+#undef SQLITE_ENABLE_API_ARMOR
+#define SQLITE_ENABLE_API_ARMOR 1
+
#ifndef SQLITE_ENABLE_BYTECODE_VTAB
# define SQLITE_ENABLE_BYTECODE_VTAB 1
#endif