]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix a (harmless) uninitialized variable reference in b-tree balancing for
authordrh <drh@noemail.net>
Sat, 6 Dec 2014 02:05:44 +0000 (02:05 +0000)
committerdrh <drh@noemail.net>
Sat, 6 Dec 2014 02:05:44 +0000 (02:05 +0000)
auto-vacuumed tables with overflow pages.

FossilOrigin-Name: dd1dd4451f468599f7a0c2f7b5ee6125db3bb152

manifest
manifest.uuid
src/btree.c

index e449f815e3816054aa71e58f62be2a8ceacb6fea..63c34c8bc0c2c9740d70ffb252a70eb51aeaf091 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Avoid\sa\spotential\sNULL\spointer\sdeference\sin\sthe\ssqlite3_stmt_scanstatus()\nlogic.
-D 2014-12-05T21:18:19.223
+C Fix\sa\s(harmless)\suninitialized\svariable\sreference\sin\sb-tree\sbalancing\sfor\nauto-vacuumed\stables\swith\soverflow\spages.
+D 2014-12-06T02:05:44.178
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 6c4f961fa91d0b4fa121946a19f9e5eac2f2f809
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -173,7 +173,7 @@ F src/auth.c b56c78ebe40a2110fd361379f7e8162d23f92240
 F src/backup.c 7ddee9c7d505e07e959a575b18498f17c71e53ea
 F src/bitvec.c 19a4ba637bd85f8f63fc8c9bae5ade9fb05ec1cb
 F src/btmutex.c 49ca66250c7dfa844a4d4cb8272b87420d27d3a5
-F src/btree.c 44b58cd798a32579816ce274e415de262df9843d
+F src/btree.c b17571670289b07a9de2eeb07a0b6f8d3b0e5368
 F src/btree.h e31a3a3ebdedb1caf9bda3ad5dbab3db9b780f6e
 F src/btreeInt.h 3363e18fd76f69a27a870b25221b2345b3fd4d21
 F src/build.c 67bb05b1077e0cdaccb2e36bfcbe7a5df9ed31e8
@@ -1225,7 +1225,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P c1ae1268b9023a771fda98f26bf451c6066fe70b
-R f53c4ff709cb4a78a86ac1697287f29f
+P 42d44adc13d52b8dd571c9375eb48298123d5a60
+R e3e823c5583914bbca49308565af7dd0
 U drh
-Z 2440e7c1515e4798b405fcb66c6b9d26
+Z 667f4fff17e87dbc2be9d4c807ff4dab
index 0933f85c231e6851ee7b70137dbf947b5eef0b00..d0ed6a997915802550650fd5736af6cbedc43d77 100644 (file)
@@ -1 +1 @@
-42d44adc13d52b8dd571c9375eb48298123d5a60
\ No newline at end of file
+dd1dd4451f468599f7a0c2f7b5ee6125db3bb152
\ No newline at end of file
index 796b44403d5ad998d21fe064f720f5c773f1a1ab..671f0fb2faa53943a6795bbc7d4e05b22ca1cbd5 100644 (file)
@@ -7094,7 +7094,11 @@ static int balance_nonroot(
       ** if sibling page iOld had the same page number as pNew, and if
       ** pCell really was a part of sibling page iOld (not a divider or
       ** overflow cell), we can skip updating the pointer map entries.  */
-      if( pNew->pgno!=aPgno[iOld] || pCell<aOld || pCell>=&aOld[usableSize] ){
+      if( iOld>=nNew
+       || pNew->pgno!=aPgno[iOld]
+       || pCell<aOld
+       || pCell>=&aOld[usableSize]
+      ){
         if( !leafCorrection ){
           ptrmapPut(pBt, get4byte(pCell), PTRMAP_BTREE, pNew->pgno, &rc);
         }