1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Avoid a double-free in an out-of-memory situation with a USING

clause or NATURAL JOIN.  Ticket #2789. (CVS 4551)

FossilOrigin-Name: 596694752c5935ae50ad38d3b41bbda39ca999d8
This commit is contained in:
drh
2007-11-23 13:42:51 +00:00
parent 2e6037cd23
commit f4ce8ed048
4 changed files with 22 additions and 16 deletions

View File

@@ -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.362 2007/11/21 15:24:01 drh Exp $
** $Id: select.c,v 1.363 2007/11/23 13:42:52 drh Exp $
*/
#include "sqliteInt.h"
@@ -248,10 +248,7 @@ static void addWhereTerm(
ExprSetProperty(pE, EP_FromJoin);
pE->iRightJoinTable = iRightJoinTable;
}
pE = sqlite3ExprAnd(pParse->db,*ppExpr, pE);
if( pE ){
*ppExpr = pE;
}
*ppExpr = sqlite3ExprAnd(pParse->db,*ppExpr, pE);
}
/*