]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix another bad assert() in btree - one that can be false on a corrupt database
authordrh <drh@noemail.net>
Fri, 22 May 2015 23:39:29 +0000 (23:39 +0000)
committerdrh <drh@noemail.net>
Fri, 22 May 2015 23:39:29 +0000 (23:39 +0000)
file.

FossilOrigin-Name: 89f0bbfde4d86a7b15e93aab9c487b4355c6fb2d

manifest
manifest.uuid
src/btree.c

index cc487cf384d5489c9236db6ccce8d058cbf85990..c7cda0512f622991dbd3bb0b3c43b2788ad35eb0 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sincorrect\svalidation\sof\sthe\ssize\sof\sthe\sBLOB\sreturned\sby\sa\sgeometry\nfunction\son\sthe\sRHS\sof\sa\sMATCH\soperator\sin\sRTree.\s\sThe\sold\scode\sworked\sfor\n64-bit\ssystems\s(by\schance)\sbut\sfails\son\s32-bit.
-D 2015-05-22T23:17:28.381
+C Fix\sanother\sbad\sassert()\sin\sbtree\s-\sone\sthat\scan\sbe\sfalse\son\sa\scorrupt\sdatabase\nfile.
+D 2015-05-22T23:39:29.128
 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 0eb4eb39e75be6170f1e59f7d6aabedaefb19938
+F src/btree.c d2bf38cf256bd2fcaa9ed87f2f217167d849fc1b
 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 c1814242e6ce035d486cfbad5a1f4b49aa8898f3
-R f01355780527736c645fe9d48d526152
+P 10cc44f5a63e6cadf6940bb7310a177ee7fa6ee2
+R 12583c8a4670388a5d60502757678b98
 U drh
-Z c568275ed97c21c4c01709075e3bc4ce
+Z f1e1ea5567a0f5557363801842b88558
index 5d4569be1be252726e5de686768bca8beb77c60e..850b0dbfaf01643d9a1a7b9c6a1881237a9808f4 100644 (file)
@@ -1 +1 @@
-10cc44f5a63e6cadf6940bb7310a177ee7fa6ee2
\ No newline at end of file
+89f0bbfde4d86a7b15e93aab9c487b4355c6fb2d
\ No newline at end of file
index 6b7da394ac9529f0f2b93c1e334a80374ec89922..01ce974d7501508eec9f0538340e3c16b7f8ac01 100644 (file)
@@ -6167,7 +6167,8 @@ static void rebuildPage(
     memcpy(pData, pCell, szCell[i]);
     put2byte(pCellptr, (pData - aData));
     pCellptr += 2;
-    assert( szCell[i]==cellSizePtr(pPg, pCell) );
+    assert( szCell[i]==cellSizePtr(pPg, pCell) || CORRUPT_DB );
+    testcase( szCell[i]!=cellSizePtr(pPg,pCell) );
   }
 
   /* The pPg->nFree field is now set incorrectly. The caller will fix it. */