diff options
author | danielk1977 <danielk1977@noemail.net> | 2008-01-24 14:27:44 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2008-01-24 14:27:44 +0000 |
commit | cdf3020ca387a32b8633de152e0f75c60e141dcd (patch) | |
tree | 97ddc2466ce9a51e5e0d3420c1856be868e2b645 /src | |
parent | ac559264e3af94983212e8936438b88ae99eef8f (diff) | |
download | sqlite-cdf3020ca387a32b8633de152e0f75c60e141dcd.tar.gz sqlite-cdf3020ca387a32b8633de152e0f75c60e141dcd.zip |
Fix a segfault that may follow a malloc failure during compilation of an INSTEAD OF trigger. (CVS 4749)
FossilOrigin-Name: c6635a71dbb2a06d56a0cfce7f0383325e12dc01
Diffstat (limited to 'src')
-rw-r--r-- | src/select.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/select.c b/src/select.c index f22527585..551de921b 100644 --- a/src/select.c +++ b/src/select.c @@ -12,7 +12,7 @@ ** This file contains C code routines that are called by the parser ** to handle SELECT statements in SQLite. ** -** $Id: select.c,v 1.409 2008/01/23 17:13:41 danielk1977 Exp $ +** $Id: select.c,v 1.410 2008/01/24 14:27:44 danielk1977 Exp $ */ #include "sqliteInt.h" @@ -2911,12 +2911,12 @@ static void updateAccumulator(Parse *pParse, AggInfo *pAggInfo){ ** special value 0xffffffff, then all columns are populated. */ void sqlite3SelectMask(Parse *pParse, Select *p, u32 mask){ - if( !p->pPrior && !p->isDistinct && mask!=0xffffffff ){ + if( p && !p->pPrior && !p->isDistinct && mask!=0xffffffff ){ ExprList *pEList; int i; sqlite3SelectResolve(pParse, p, 0); pEList = p->pEList; - for(i=0; i<pEList->nExpr && i<32; i++){ + for(i=0; pEList && i<pEList->nExpr && i<32; i++){ if( !(mask&((u32)1<<i)) ){ sqlite3ExprDelete(pEList->a[i].pExpr); pEList->a[i].pExpr = sqlite3Expr(pParse->db, TK_NULL, 0, 0, 0); |