aboutsummaryrefslogtreecommitdiff
path: root/src/complete.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2014-10-24 00:35:58 +0000
committerdrh <drh@noemail.net>2014-10-24 00:35:58 +0000
commit9ca95730e3a25bf5b335ec73a0a14f0112a421fb (patch)
tree3d17fb8a23416f52cd800470fb9509d646fe2800 /src/complete.c
parent4f81bbb5289cdd248c21775b9e4cdb92e110e139 (diff)
downloadsqlite-9ca95730e3a25bf5b335ec73a0a14f0112a421fb.tar.gz
sqlite-9ca95730e3a25bf5b335ec73a0a14f0112a421fb.zip
Add the SQLITE_ENABLE_API_ARMOR compile-time option. This is a work in
progress and is not yet completely functional. FossilOrigin-Name: c297a84bc678f81ffc0aa9139ab73f0ca87c1971
Diffstat (limited to 'src/complete.c')
-rw-r--r--src/complete.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/complete.c b/src/complete.c
index 6ab6f4a04..c439cfe18 100644
--- a/src/complete.c
+++ b/src/complete.c
@@ -105,6 +105,13 @@ int sqlite3_complete(const char *zSql){
u8 state = 0; /* Current state, using numbers defined in header comment */
u8 token; /* Value of the next token */
+#ifdef SQLITE_ENABLE_API_ARMOR
+ if( zSql==0 ){
+ (void)SQLITE_MISUSE_BKPT;
+ return 0;
+ }
+#endif
+
#ifndef SQLITE_OMIT_TRIGGER
/* A complex statement machine used to detect the end of a CREATE TRIGGER
** statement. This is the normal case.