]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix an off-by-one error in the scratch memory allocator.
authordrh <drh@noemail.net>
Thu, 2 Sep 2010 18:13:00 +0000 (18:13 +0000)
committerdrh <drh@noemail.net>
Thu, 2 Sep 2010 18:13:00 +0000 (18:13 +0000)
FossilOrigin-Name: 5a9591607a0a5ba4527bf2a90179651053244953

manifest
manifest.uuid
src/malloc.c

index 10002b35efc0897025865534a581af069d5735b4..03bfe4ae1ccb0d260b64c58cdf229fa76808c0e7 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,8 +1,8 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-C Use\ssqlite3_mutex_notheld()\sinstead\sof\s!sqlite3_mutex_held()\sinside\nof\sassert()\sstatements\ssince\sthe\sformer\sworks\swhen\smutexing\sis\sdisabled\nwhile\sthe\slatter\sdoes\snot.
-D 2010-09-02T17:15:19
+C Fix\san\soff-by-one\serror\sin\sthe\sscratch\smemory\sallocator.
+D 2010-09-02T18:13:01
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in c599a15d268b1db2aeadea19df2adc3bf2eb6bee
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -142,7 +142,7 @@ F src/legacy.c a199d7683d60cef73089e892409113e69c23a99f
 F src/lempar.c 7f026423f4d71d989e719a743f98a1cbd4e6d99e
 F src/loadext.c 6d422ea91cf3d2d00408c5a8f2391cd458da85f8
 F src/main.c b92c6c9a302999975897730b2808708fbf531a56
-F src/malloc.c 2231edbd06f23dd6966f30eda26cb7b365741673
+F src/malloc.c e0e9ca16a90215e2f0b53e7f5cc17abe01fbe34a
 F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
 F src/mem1.c 00bd8265c81abb665c48fea1e0c234eb3b922206
 F src/mem2.c e307323e86b5da1853d7111b68fd6b84ad6f09cf
@@ -856,14 +856,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P 2a5eed35b410fb6bd69242841c00700906f48d5f
-R 0c22e9c2aca445476ab0951fae018b3f
+P 2211486b69cf53f5efb1334aff8b403b26596102
+R 58aa05496d4c88e93839c30ad7f0f12f
 U drh
-Z a9898d4883843bb1e58123dd33c0c45f
+Z 9ab20b082ef4d5eb3039a58dec067745
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.6 (GNU/Linux)
 
-iD8DBQFMf9uqoxKgR168RlERAgkIAJ4//z+UaADrF2cV99XQ6qH5bKAT7QCggncs
-C2rjXXoF03atWsdT31EAiGY=
-=MDOk
+iD8DBQFMf+kwoxKgR168RlERArAIAJ44f+KasgThCWlpaivQQWtOA27OrACeL7/e
+Ym5tzUVAgx/gSuZ7kCIQ05g=
+=rGma
 -----END PGP SIGNATURE-----
index a54158736d9eabd3e4768dd689813605e036da8f..47194d729135b3cde7001b4495dd827f57260541 100644 (file)
@@ -1 +1 @@
-2211486b69cf53f5efb1334aff8b403b26596102
\ No newline at end of file
+5a9591607a0a5ba4527bf2a90179651053244953
\ No newline at end of file
index b8d47ad85368302da64f8bee19052aa31c164f6b..85ba9468c995ecf70d217c4d56c106d06ffd0b40 100644 (file)
@@ -127,7 +127,7 @@ int sqlite3MallocInit(void){
     mem0.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM);
   }
   if( sqlite3GlobalConfig.pScratch && sqlite3GlobalConfig.szScratch>=100
-      && sqlite3GlobalConfig.nScratch>=0 ){
+      && sqlite3GlobalConfig.nScratch>0 ){
     int i, n, sz;
     ScratchFreeslot *pSlot;
     sz = ROUNDDOWN8(sqlite3GlobalConfig.szScratch);