diff options
author | drh <> | 2023-05-17 15:46:46 +0000 |
---|---|---|
committer | drh <> | 2023-05-17 15:46:46 +0000 |
commit | 60fd5c34abec24a39fdb9e467174944f8d245544 (patch) | |
tree | 61f9ec236d9c4b1fdd0dd010b5927aff73e69e14 /src/expr.c | |
parent | 9c9b33cbaf65be1604bd419af0e3d00c52523fd8 (diff) | |
download | sqlite-60fd5c34abec24a39fdb9e467174944f8d245544.tar.gz sqlite-60fd5c34abec24a39fdb9e467174944f8d245544.zip |
New assert() statements to verify that Expr.iColumn is never used as an
array index when its value is negative.
FossilOrigin-Name: 6084c5fb6d3fcedf35cd6c597a44ec7bf8b4a2576c7b277e5342d2a7905318e7
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/expr.c b/src/expr.c index c6bc847ab..f920b4015 100644 --- a/src/expr.c +++ b/src/expr.c @@ -67,6 +67,7 @@ char sqlite3ExprAffinity(const Expr *pExpr){ if( op==TK_SELECT_COLUMN ){ assert( pExpr->pLeft!=0 && ExprUseXSelect(pExpr->pLeft) ); assert( pExpr->iColumn < pExpr->iTable ); + assert( pExpr->iColumn >= 0 ); assert( pExpr->iTable==pExpr->pLeft->x.pSelect->pEList->nExpr ); return sqlite3ExprAffinity( pExpr->pLeft->x.pSelect->pEList->a[pExpr->iColumn].pExpr |