aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2014-12-05 19:50:58 +0000
committerdrh <drh@noemail.net>2014-12-05 19:50:58 +0000
commitfe32daaeaaffb3306d885b39d33774bc432607ba (patch)
tree89aad82dc92beda48129ec55fe9f2d196f4c766f /src
parentebdb81dd455a3c3965b3159129d96fbcc49adb13 (diff)
downloadsqlite-fe32daaeaaffb3306d885b39d33774bc432607ba.tar.gz
sqlite-fe32daaeaaffb3306d885b39d33774bc432607ba.zip
Make sure the WhereTerm objects are fully zeroed when they are allocated.
FossilOrigin-Name: fdb667335c2250239a66143aec4235325dec8274
Diffstat (limited to 'src')
-rw-r--r--src/where.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/where.c b/src/where.c
index bda2a801e..8ec6018bc 100644
--- a/src/where.c
+++ b/src/where.c
@@ -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) ){