]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Earlier detection of a specific kind of corruption in the balance_nonroot()
authordrh <drh@noemail.net>
Sat, 23 May 2015 19:29:08 +0000 (19:29 +0000)
committerdrh <drh@noemail.net>
Sat, 23 May 2015 19:29:08 +0000 (19:29 +0000)
routine.

FossilOrigin-Name: ee6dc9913a8733891576e6e298241f7440209c5e

manifest
manifest.uuid
src/btree.c

index 8956df4e6421945cdea4a0a986ad4ecc53d30f6c..f0b235a933e5e84f13ee0ccb5a10130294e34999 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Minor\sdocumentation\simprovements.\s\sNo\schanges\sto\scode.
-D 2015-05-23T02:44:00.021
+C Earlier\sdetection\sof\sa\sspecific\skind\sof\scorruption\sin\sthe\sbalance_nonroot()\nroutine.
+D 2015-05-23T19:29:08.948
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 0a6ae26396ec696221021780dffbb894ff3cead7
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -192,7 +192,7 @@ F src/auth.c b56c78ebe40a2110fd361379f7e8162d23f92240
 F src/backup.c ff743689c4d6c5cb55ad42ed9d174b2b3e71f1e3
 F src/bitvec.c 5eb7958c3bf65210211cbcfc44eff86d0ded7c9d
 F src/btmutex.c 45a968cc85afed9b5e6cf55bf1f42f8d18107f79
-F src/btree.c d2bf38cf256bd2fcaa9ed87f2f217167d849fc1b
+F src/btree.c c40b84835216d0f4c85889b3b86648b375936528
 F src/btree.h 969adc948e89e449220ff0ff724c94bb2a52e9f1
 F src/btreeInt.h 973a22a6fd61350b454ad614832b1f0a5e25a1e4
 F src/build.c d5d9090788118178190c5724c19f93953b8c7a4e
@@ -1278,7 +1278,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 c404fcace83613a50015f15097b7f28123c221c3
-R aea65554b1ff9d1de4bd129eeec24691
+P e446d9ce0049b8ce0fd4f03205a0c32776fc76cd
+R adb5597802e2180b564cf04263c0d643
 U drh
-Z b24694de2ad87d8d1cd289eb9cfaf505
+Z 0cf4cd65645d8faec0ee2a47a85adb56
index 6ea25ad1589eb5ad8097b7145042561083d20fdc..97a87ce5d40ac263214593bd4ddc4355b190ec18 100644 (file)
@@ -1 +1 @@
-e446d9ce0049b8ce0fd4f03205a0c32776fc76cd
\ No newline at end of file
+ee6dc9913a8733891576e6e298241f7440209c5e
\ No newline at end of file
index 01ce974d7501508eec9f0538340e3c16b7f8ac01..6ce6a17635e77b735fa7048b24ef980c7c29214c 100644 (file)
@@ -6879,6 +6879,10 @@ static int balance_nonroot(
       apCell[nCell] = pTemp+leafCorrection;
       assert( leafCorrection==0 || leafCorrection==4 );
       szCell[nCell] = szCell[nCell] - leafCorrection;
+      if( szCell[nCell]<3 ){
+        rc = SQLITE_CORRUPT_BKPT;
+        goto balance_cleanup;
+      }
       if( !pOld->leaf ){
         assert( leafCorrection==0 );
         assert( pOld->hdrOffset==0 );