aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wherecode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wherecode.c b/src/wherecode.c
index ab947773b..85df64279 100644
--- a/src/wherecode.c
+++ b/src/wherecode.c
@@ -622,8 +622,8 @@ static int codeEqualityTerm(
}
sqlite3ExprDelete(db, pX);
}else{
- aiMap = (int*)sqlite3DbMallocZero(pParse->db,
- sizeof(int)*sqlite3ExprVectorSize(pX->pLeft));
+ int n = sqlite3ExprVectorSize(pX->pLeft);
+ aiMap = (int*)sqlite3DbMallocZero(pParse->db, sizeof(int)*MAX(nEq,n));
eType = sqlite3FindInIndex(pParse, pX, IN_INDEX_LOOP, 0, aiMap, &iTab);
}
pX = pExpr;