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

Fix a NULL pointer dereference following an OOM error in the column name

resolver. (CVS 6685)

FossilOrigin-Name: 3b46142532934d17aa136c2e56e58e7828df0f54
This commit is contained in:
drh
2009-05-28 14:34:49 +00:00
parent 0b0745ae37
commit 2c220455b9
3 changed files with 9 additions and 8 deletions

View File

@@ -14,7 +14,7 @@
** resolve all identifiers by associating them with a particular
** table and column.
**
** $Id: resolve.c,v 1.25 2009/05/28 12:49:53 drh Exp $
** $Id: resolve.c,v 1.26 2009/05/28 14:34:50 drh Exp $
*/
#include "sqliteInt.h"
#include <stdlib.h>
@@ -73,6 +73,7 @@ static void resolveAlias(
pDup->iTable = pEList->a[iCol].iAlias;
}else if( ExprHasProperty(pOrig, EP_IntValue) || pOrig->u.zToken==0 ){
pDup = sqlite3ExprDup(db, pOrig, 0);
if( pDup==0 ) return;
}else{
char *zToken = pOrig->u.zToken;
pOrig->u.zToken = 0;