mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-09 14:21:03 +03:00
Make it safe to call sqliteMalloc() with a request for 0 bytes. Ticket #534. (CVS 1164)
FossilOrigin-Name: 6c858db2c099c7ba73d72e02b19bf6173620db13
This commit is contained in:
12
manifest
12
manifest
@@ -1,5 +1,5 @@
|
||||
C Preserve\sthe\sHH:MM:SS\sfor\smost\sdate/time\smodifiers.\s\sTicket\s#551.\s(CVS\s1163)
|
||||
D 2004-01-07T03:29:16
|
||||
C Make\sit\ssafe\sto\scall\ssqliteMalloc()\swith\sa\srequest\sfor\s0\sbytes.\s\sTicket\s#534.\s(CVS\s1164)
|
||||
D 2004-01-07T03:41:04
|
||||
F Makefile.in 0515ff9218ad8d5a8f6220f0494b8ef94c67013b
|
||||
F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
|
||||
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
|
||||
@@ -61,7 +61,7 @@ F src/threadtest.c d641a5219e718e18a1a80a50eb9bb549f451f42e
|
||||
F src/tokenize.c 5597df1fd76d6947e7da824856ac1910e2055729
|
||||
F src/trigger.c ce83e017b407d046e909d05373d7f8ee70f9f7f9
|
||||
F src/update.c 24260b4fda00c9726d27699a0561d53c0dccc397
|
||||
F src/util.c 22977a29c80c027730aa4bb44854ba4b72e92a59
|
||||
F src/util.c 64995b5949a5d377629ffd2598747bc771cade1e
|
||||
F src/vacuum.c 77485a64a6e4e358170f150fff681c1624a092b0
|
||||
F src/vdbe.c a16a084ca40edeec3a2e490d6f672fc84f851dd9
|
||||
F src/vdbe.h 3957844e46fea71fd030e78f6a3bd2f7e320fb43
|
||||
@@ -179,7 +179,7 @@ F www/speed.tcl 2f6b1155b99d39adb185f900456d1d592c4832b3
|
||||
F www/sqlite.tcl 3c83b08cf9f18aa2d69453ff441a36c40e431604
|
||||
F www/tclsqlite.tcl b9271d44dcf147a93c98f8ecf28c927307abd6da
|
||||
F www/vdbe.tcl 9b9095d4495f37697fd1935d10e14c6015e80aa1
|
||||
P 8371f662d22be0a3c58e0503c7511faea1640955
|
||||
R 9beb2865d5ca7294516b220b6efbaf89
|
||||
P 70df32b716b0d6a4f72bb3ae6496431e53733b6a
|
||||
R 81967e931e92d936dc4d0dd66b067402
|
||||
U drh
|
||||
Z 2e358c90c9fe078d5ac1cc696a8654f1
|
||||
Z 999146283487fc892d6fd412710898d3
|
||||
|
||||
@@ -1 +1 @@
|
||||
70df32b716b0d6a4f72bb3ae6496431e53733b6a
|
||||
6c858db2c099c7ba73d72e02b19bf6173620db13
|
||||
@@ -14,7 +14,7 @@
|
||||
** This file contains functions for allocating memory, comparing
|
||||
** strings, and stuff like that.
|
||||
**
|
||||
** $Id: util.c,v 1.71 2004/01/07 03:04:27 drh Exp $
|
||||
** $Id: util.c,v 1.72 2004/01/07 03:41:04 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <stdarg.h>
|
||||
@@ -252,7 +252,7 @@ char *sqliteStrNDup_(const char *z, int n, char *zFile, int line){
|
||||
void *sqliteMalloc(int n){
|
||||
void *p;
|
||||
if( (p = malloc(n))==0 ){
|
||||
sqlite_malloc_failed++;
|
||||
if( n>0 ) sqlite_malloc_failed++;
|
||||
}else{
|
||||
memset(p, 0, n);
|
||||
}
|
||||
@@ -266,7 +266,7 @@ void *sqliteMalloc(int n){
|
||||
void *sqliteMallocRaw(int n){
|
||||
void *p;
|
||||
if( (p = malloc(n))==0 ){
|
||||
sqlite_malloc_failed++;
|
||||
if( n>0 ) sqlite_malloc_failed++;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user