1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-18 10:21:03 +03:00

Make sure the WhereTerm objects are fully zeroed when they are allocated.

FossilOrigin-Name: fdb667335c2250239a66143aec4235325dec8274
This commit is contained in:
drh
2014-12-05 19:50:58 +00:00
parent ebdb81dd45
commit fe32daaeaa
3 changed files with 8 additions and 8 deletions

View File

@@ -222,6 +222,7 @@ static int whereClauseInsert(WhereClause *pWC, Expr *p, u8 wtFlags){
sqlite3DbFree(db, pOld);
}
pWC->nSlot = sqlite3DbMallocSize(db, pWC->a)/sizeof(pWC->a[0]);
memset(&pWC->a[pWC->nTerm], 0, sizeof(pWC->a[0])*(pWC->nSlot-pWC->nTerm));
}
pTerm = &pWC->a[idx = pWC->nTerm++];
if( p && ExprHasProperty(p, EP_Unlikely) ){