1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Work around buggy malloc() implementations that cause problems on malloc(0).

Ticket #1572. (CVS 2996)

FossilOrigin-Name: ada5490f12795a8d13d0f42077c463709c677846
This commit is contained in:
drh
2006-01-23 13:14:55 +00:00
parent 75bab7d64e
commit 158ff67b50
3 changed files with 11 additions and 11 deletions

View File

@@ -14,7 +14,7 @@
** 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 $
** $Id: legacy.c,v 1.13 2006/01/23 13:14:55 drh Exp $
*/
#include "sqliteInt.h"
@@ -68,8 +68,8 @@ int sqlite3_exec(
nCallback = 0;
nCol = sqlite3_column_count(pStmt);
azCols = sqliteMalloc(2*nCol*sizeof(const char *));
if( nCol && !azCols ){
azCols = sqliteMalloc(2*nCol*sizeof(const char *) + 1);
if( azCols==0 ){
goto exec_out;
}