mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-15 11:41:13 +03:00
Fix a potential assertion fault discovered by OSS-Fuzz.
FossilOrigin-Name: 71c03b59b645884ebd6b9e18713cd2eb8c949870
This commit is contained in:
@@ -913,6 +913,7 @@ static void exprAnalyze(
|
||||
Parse *pParse = pWInfo->pParse; /* Parsing context */
|
||||
sqlite3 *db = pParse->db; /* Database connection */
|
||||
unsigned char eOp2; /* op2 value for LIKE/REGEXP/GLOB */
|
||||
int nLeft; /* Number of elements on left side vector */
|
||||
|
||||
if( db->mallocFailed ){
|
||||
return;
|
||||
@@ -1184,13 +1185,12 @@ static void exprAnalyze(
|
||||
** is not a sub-select. */
|
||||
if( pWC->op==TK_AND
|
||||
&& (pExpr->op==TK_EQ || pExpr->op==TK_IS)
|
||||
&& sqlite3ExprIsVector(pExpr->pLeft)
|
||||
&& (nLeft = sqlite3ExprVectorSize(pExpr->pLeft))>1
|
||||
&& sqlite3ExprVectorSize(pExpr->pRight)==nLeft
|
||||
&& ( (pExpr->pLeft->flags & EP_xIsSelect)==0
|
||||
|| (pExpr->pRight->flags & EP_xIsSelect)==0
|
||||
)){
|
||||
int nLeft = sqlite3ExprVectorSize(pExpr->pLeft);
|
||||
|| (pExpr->pRight->flags & EP_xIsSelect)==0)
|
||||
){
|
||||
int i;
|
||||
assert( nLeft==sqlite3ExprVectorSize(pExpr->pRight) );
|
||||
for(i=0; i<nLeft; i++){
|
||||
int idxNew;
|
||||
Expr *pNew;
|
||||
|
||||
Reference in New Issue
Block a user