aboutsummaryrefslogtreecommitdiff
path: root/src/expr.c
diff options
context:
space:
mode:
authordrh <>2023-12-19 11:57:29 +0000
committerdrh <>2023-12-19 11:57:29 +0000
commita3569fb2ca818cfdb63296413949a6169c62b086 (patch)
treebf48a6935bef6e734b115644875f23207f23ef35 /src/expr.c
parent459f7b109014849034b930bc950cfff1f93b6dcf (diff)
downloadsqlite-a3569fb2ca818cfdb63296413949a6169c62b086.tar.gz
sqlite-a3569fb2ca818cfdb63296413949a6169c62b086.zip
Extra ALWAYS() macros to verify state in the sqlite3ExprCanBeNull() routine.
FossilOrigin-Name: be19b84c9f3fe127165809908add148dbe9a827a55608b0490de7e69b7f7f191
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;