1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

Extra ALWAYS() macros to verify state in the sqlite3ExprCanBeNull() routine.

FossilOrigin-Name: be19b84c9f3fe127165809908add148dbe9a827a55608b0490de7e69b7f7f191
This commit is contained in:
drh
2023-12-19 11:57:29 +00:00
parent 459f7b1090
commit a3569fb2ca
3 changed files with 9 additions and 7 deletions

View File

@@ -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;