/ Check-in [4bb256ee]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:A failed malloc() could have resulted in a segfault. Fixed by this check-in. (CVS 1102)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:4bb256ee3ecd44d71d90556e16bb56c0389fd5b5
User & Date: drh 2003-09-23 10:25:33
Context
2003-09-27
00:41
Do all WHERE clauses tests, even if an index is used for lookup so that we know the test cannot be FALSE. The test might end up being NULL in which case it would need to be treated as false. Ticket #461. (CVS 1103) check-in: 5aea8148 user: drh tags: trunk
2003-09-23
10:25
A failed malloc() could have resulted in a segfault. Fixed by this check-in. (CVS 1102) check-in: 4bb256ee user: drh tags: trunk
00:36
allow -enable-releasemode as an option and allow Makefile to produce version independent binary like libsqlite-2.8.6.so instead of libsqlite.so.0.0.0 (CVS 1101) check-in: 4fdd44a5 user: xdong tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/expr.c.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** 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 $
*/
#include "sqliteInt.h"
#include <ctype.h>

/*
** Construct a new expression node and return a pointer to it.  Memory
** for this node is obtained from sqliteMalloc().  The calling function
................................................................................
    a = sqliteRealloc(pList->a, pList->nAlloc*sizeof(pList->a[0]));
    if( a==0 ){
      sqliteExprDelete(pExpr);
      return pList;
    }
    pList->a = a;
  }
  if( pExpr || pName ){
    i = pList->nExpr++;
    pList->a[i].pExpr = pExpr;
    pList->a[i].zName = 0;
    if( pName ){
      sqliteSetNString(&pList->a[i].zName, pName->z, pName->n, 0);
      sqliteDequote(pList->a[i].zName);
    }







|







 







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
**
** $Id: expr.c,v 1.101 2003/09/23 10:25:33 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>

/*
** Construct a new expression node and return a pointer to it.  Memory
** for this node is obtained from sqliteMalloc().  The calling function
................................................................................
    a = sqliteRealloc(pList->a, pList->nAlloc*sizeof(pList->a[0]));
    if( a==0 ){
      sqliteExprDelete(pExpr);
      return pList;
    }
    pList->a = a;
  }
  if( pList->a && (pExpr || pName) ){
    i = pList->nExpr++;
    pList->a[i].pExpr = pExpr;
    pList->a[i].zName = 0;
    if( pName ){
      sqliteSetNString(&pList->a[i].zName, pName->z, pName->n, 0);
      sqliteDequote(pList->a[i].zName);
    }