/ Check-in [d6549954]
Login

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

Overview
Comment:Fix a bulk-memory initialization problem in the expression list logic. (CVS 1130)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d6549954408b01e5eaf865b9100739c94de28f16
User & Date: drh 2003-12-10 03:13:44
Context
2003-12-15
17:51
Updates to the homepage - fix the CVS access instructions. (CVS 1131) check-in: 653a7dd9 user: drh tags: trunk
2003-12-10
03:13
Fix a bulk-memory initialization problem in the expression list logic. (CVS 1130) check-in: d6549954 user: drh tags: trunk
01:31
Fix the code generator to a void a VDBE stack overflow on 3-way joins. Ticket #519. (CVS 1129) check-in: 230a4ff2 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/expr.c.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This file contains routines used for analyzing expressions and
    13     13   ** for generating VDBE code that evaluates expressions in SQLite.
    14     14   **
    15         -** $Id: expr.c,v 1.101 2003/09/23 10:25:33 drh Exp $
           15  +** $Id: expr.c,v 1.102 2003/12/10 03:13:44 drh Exp $
    16     16   */
    17     17   #include "sqliteInt.h"
    18     18   #include <ctype.h>
    19     19   
    20     20   /*
    21     21   ** Construct a new expression node and return a pointer to it.  Memory
    22     22   ** for this node is obtained from sqliteMalloc().  The calling function
................................................................................
   263    263         sqliteExprDelete(pExpr);
   264    264         return pList;
   265    265       }
   266    266       pList->a = a;
   267    267     }
   268    268     if( pList->a && (pExpr || pName) ){
   269    269       i = pList->nExpr++;
          270  +    memset(&pList->a[i], 0, sizeof(pList->a[i]));
   270    271       pList->a[i].pExpr = pExpr;
   271         -    pList->a[i].zName = 0;
   272    272       if( pName ){
   273    273         sqliteSetNString(&pList->a[i].zName, pName->z, pName->n, 0);
   274    274         sqliteDequote(pList->a[i].zName);
   275    275       }
   276    276     }
   277    277     return pList;
   278    278   }