aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordan <dan@noemail.net>2020-08-20 16:25:26 +0000
committerdan <dan@noemail.net>2020-08-20 16:25:26 +0000
commit6c3b4b07d13f1cb9047103582381925a01f1a3a2 (patch)
tree7a77fc0ff9df1201b7041388f2de07eb35b76cb2 /src
parent7b14b990d0fbf4b28a13095702d3d81684da15ec (diff)
downloadsqlite-6c3b4b07d13f1cb9047103582381925a01f1a3a2.tar.gz
sqlite-6c3b4b07d13f1cb9047103582381925a01f1a3a2.zip
Fix a crash that could occur in SQLITE_MAX_EXPR_DEPTH=0 builds when processing SQL containing syntax errors.
FossilOrigin-Name: 5f58dd3a19605b6f49b4364fa29892502eff35f12a7693a8694100e1844711ea
Diffstat (limited to 'src')
-rw-r--r--src/expr.c1
-rw-r--r--src/sqliteLimit.h6
2 files changed, 2 insertions, 5 deletions
diff --git a/src/expr.c b/src/expr.c
index 244412b38..7277bb75d 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -768,6 +768,7 @@ int sqlite3SelectExprHeight(Select *p){
** Expr.flags.
*/
void sqlite3ExprSetHeightAndFlags(Parse *pParse, Expr *p){
+ if( pParse->nErr ) return;
if( p && p->x.pList && !ExprHasProperty(p, EP_xIsSelect) ){
p->flags |= EP_Propagate & sqlite3ExprListFlags(p->x.pList);
}
diff --git a/src/sqliteLimit.h b/src/sqliteLimit.h
index a7302575c..08703cb73 100644
--- a/src/sqliteLimit.h
+++ b/src/sqliteLimit.h
@@ -60,11 +60,7 @@
** The maximum depth of an expression tree. This is limited to
** some extent by SQLITE_MAX_SQL_LENGTH. But sometime you might
** want to place more severe limits on the complexity of an
-** expression.
-**
-** A value of 0 used to mean that the limit was not enforced.
-** But that is no longer true. The limit is now strictly enforced
-** at all times.
+** expression. A value of 0 means that there is no limit.
*/
#ifndef SQLITE_MAX_EXPR_DEPTH
# define SQLITE_MAX_EXPR_DEPTH 1000