aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr.c')
-rw-r--r--src/expr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/expr.c b/src/expr.c
index 756fcc569..ebe0721ca 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -2743,6 +2743,8 @@ int sqlite3ExprCanBeNull(const Expr *p){
p->y.pTab==0 || /* Reference to column of index on expression */
(p->iColumn>=0
&& p->y.pTab->aCol!=0 /* Possible due to prior error */
+ && ALWAYS(p->iColumn>=0)
+ && ALWAYS(p->iColumn<p->y.pTab->nCol)
&& p->y.pTab->aCol[p->iColumn].notNull==0);
default:
return 1;