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 a query that used a vector comparison contained certain types of syntax errors.

FossilOrigin-Name: 203f07c5e140e74cf91d0c1e20135c21236f0fc1
This commit is contained in:
dan
2016-08-20 15:01:24 +00:00
parent 9e730f0bb8
commit f358009a93
4 changed files with 27 additions and 11 deletions

View File

@@ -462,8 +462,8 @@ static int exprVectorRegister(
int *pRegFree /* OUT: Temp register to free */
){
assert( pVector->op==TK_VECTOR || pVector->op==TK_SELECT );
assert( (pVector->op==TK_VECTOR)==(regSelect==0) );
if( regSelect ){
assert( pParse->nErr || (pVector->op==TK_VECTOR)==(regSelect==0) );
if( pVector->op==TK_SELECT ){
*ppExpr = pVector->x.pSelect->pEList->a[iField].pExpr;
return regSelect+iField;
}