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

A failed malloc() could have resulted in a segfault. Fixed by this check-in. (CVS 1102)

FossilOrigin-Name: 4bb256ee3ecd44d71d90556e16bb56c0389fd5b5
This commit is contained in:
drh
2003-09-23 10:25:32 +00:00
parent 3b5543c46d
commit f911221a1e
3 changed files with 10 additions and 10 deletions

View File

@@ -12,7 +12,7 @@
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
**
** $Id: expr.c,v 1.100 2003/09/06 22:18:08 drh Exp $
** $Id: expr.c,v 1.101 2003/09/23 10:25:33 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -265,7 +265,7 @@ ExprList *sqliteExprListAppend(ExprList *pList, Expr *pExpr, Token *pName){
}
pList->a = a;
}
if( pExpr || pName ){
if( pList->a && (pExpr || pName) ){
i = pList->nExpr++;
pList->a[i].pExpr = pExpr;
pList->a[i].zName = 0;