1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Fix a segfault that could occur if an indexed expression was used in a

comparison operation within the result-set of a SELECT statement.

FossilOrigin-Name: d6bb7c42ff6309ce168ccdcf03b4cdabfccfc9e2a911d254ac7dc4fea4aa2bc1
This commit is contained in:
dan
2017-04-11 11:52:25 +00:00
parent d6e992cb1e
commit b8d29c2f75
4 changed files with 46 additions and 10 deletions

View File

@@ -58,7 +58,7 @@ char sqlite3ExprAffinity(Expr *pExpr){
return sqlite3AffinityType(pExpr->u.zToken, 0);
}
#endif
if( op==TK_AGG_COLUMN || op==TK_COLUMN ){
if( (op==TK_AGG_COLUMN || op==TK_COLUMN) && pExpr->pTab ){
return sqlite3TableColumnAffinity(pExpr->pTab, pExpr->iColumn);
}
if( op==TK_SELECT_COLUMN ){