]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Make sqlite3Malloc always return NULL when the number of bytes to allocate
authordrh <drh@noemail.net>
Wed, 29 Jun 2005 15:33:00 +0000 (15:33 +0000)
committerdrh <drh@noemail.net>
Wed, 29 Jun 2005 15:33:00 +0000 (15:33 +0000)
is 0. (CVS 2532)

FossilOrigin-Name: 657d74ebc1d91c99e8ac6cd68fdac3864ebd8d71

manifest
manifest.uuid
src/util.c

index 12fc8b34de2b64078f016a5187de5256a71daa3f..85a9e9e6221f2518940f22374a8db0cf98268180 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Update\sSQL\ssyntax\sdocumentation\sto\sdescribe\sthe\snew\sCAST\sexpressions.\s(CVS\s2531)
-D 2005-06-26T20:00:46
+C Make\ssqlite3Malloc\salways\sreturn\sNULL\swhen\sthe\snumber\sof\sbytes\sto\sallocate\nis\s0.\s(CVS\s2532)
+D 2005-06-29T15:33:00
 F Makefile.in 64a6635ef44a98325e0cffe8d67669920a3dad47
 F Makefile.linux-gcc 06be33b2a9ad4f005a5f42b22c4a19dab3cbb5c7
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -75,7 +75,7 @@ F src/tokenize.c 57ec9926612fb9e325b57a141303573bc20c79bf
 F src/trigger.c f51dec15921629591cb98bf2e350018e268b109a
 F src/update.c e96c7b342cd8903c672162f4cf84d2c737943347
 F src/utf.c bda5eb85039ef16f2d17004c1e18c96e1ab0a80c
-F src/util.c 54d5b4d56f0d14d4ff60881b145d1d3d664bb623
+F src/util.c 1e7fe04761b07aaeba006b79e88ce7674e316560
 F src/vacuum.c 829d9e1a6d7c094b80e0899686670932eafd768c
 F src/vdbe.c 56e892e351eb3ed634c3c239e4ad5c03aecfc2bf
 F src/vdbe.h 75e466d84d362b0c4498978a9d6b1e6bd32ecf3b
@@ -283,7 +283,7 @@ F www/tclsqlite.tcl 425be741b8ae664f55cb1ef2371aab0a75109cf9
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
 F www/whentouse.tcl 528299b8316726dbcc5548e9aa0648c8b1bd055b
-P 514aaab3f99637ebb8b6e352f4e29738102579b4
-R 1ab86d1a9e2b07f93e497763112fdc00
+P d5392866bfd6e06c6d072f649356050b82273a23
+R e7d4efbbe31d42bc6c03cfcac1241e07
 U drh
-Z 409e6bc2a756bbfb87175e52685f9d7e
+Z 56338a496c34281f80fa8ed727cf9c75
index b5d78ed8b0b0a237f2b4202ca1ee6050f67956df..c6258aea77f6320b91bef3c5cd9e8b7a0c128d0a 100644 (file)
@@ -1 +1 @@
-d5392866bfd6e06c6d072f649356050b82273a23
\ No newline at end of file
+657d74ebc1d91c99e8ac6cd68fdac3864ebd8d71
\ No newline at end of file
index 80fc41da26878d4a22b6817e24a590b5126abd38..b69eab5b97f878974436ed46421f7c413ea77e62 100644 (file)
@@ -14,7 +14,7 @@
 ** This file contains functions for allocating memory, comparing
 ** strings, and stuff like that.
 **
-** $Id: util.c,v 1.138 2005/06/25 18:42:15 drh Exp $
+** $Id: util.c,v 1.139 2005/06/29 15:33:00 drh Exp $
 */
 #include "sqliteInt.h"
 #include <stdarg.h>
@@ -268,6 +268,7 @@ void sqlite3FreeX(void *p){
 */
 void *sqlite3Malloc(int n){
   void *p;
+  if( n==0 ) return 0;
   if( (p = malloc(n))==0 ){
     if( n>0 ) sqlite3_malloc_failed++;
   }else{