SQLite

Check-in [ada5490f12]
Login

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

Overview
Comment:Work around buggy malloc() implementations that cause problems on malloc(0). Ticket #1572. (CVS 2996)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ada5490f12795a8d13d0f42077c463709c677846
User & Date: drh 2006-01-23 13:14:55.000
Context
2006-01-23
13:22
Do not name variables "operator" because some compilers do not realize that "operator" is not a reserved word in ANSI-C. Ticket #1625. (CVS 2997) (check-in: 1f42a338e2 user: drh tags: trunk)
13:14
Work around buggy malloc() implementations that cause problems on malloc(0). Ticket #1572. (CVS 2996) (check-in: ada5490f12 user: drh tags: trunk)
13:09
Improve coverage of pager.c and fix an IO error handling bug found in the process. (CVS 2995) (check-in: 6ec8e6b785 user: danielk1977 tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/legacy.c.
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
**
*************************************************************************
** Main file for the SQLite library.  The routines in this file
** implement the programmer interface to the library.  Routines in
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: legacy.c,v 1.12 2006/01/18 15:25:17 danielk1977 Exp $
*/

#include "sqliteInt.h"
#include "os.h"
#include <ctype.h>

/*







|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
**
*************************************************************************
** Main file for the SQLite library.  The routines in this file
** implement the programmer interface to the library.  Routines in
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: legacy.c,v 1.13 2006/01/23 13:14:55 drh Exp $
*/

#include "sqliteInt.h"
#include "os.h"
#include <ctype.h>

/*
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
      continue;
    }

    db->nChange += nChange;
    nCallback = 0;

    nCol = sqlite3_column_count(pStmt);
    azCols = sqliteMalloc(2*nCol*sizeof(const char *));
    if( nCol && !azCols ){
      goto exec_out;
    }

    while( 1 ){
      int i;
      rc = sqlite3_step(pStmt);








|
|







64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
      continue;
    }

    db->nChange += nChange;
    nCallback = 0;

    nCol = sqlite3_column_count(pStmt);
    azCols = sqliteMalloc(2*nCol*sizeof(const char *) + 1);
    if( azCols==0 ){
      goto exec_out;
    }

    while( 1 ){
      int i;
      rc = sqlite3_step(pStmt);