aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2015-05-22 23:39:29 +0000
committerdrh <drh@noemail.net>2015-05-22 23:39:29 +0000
commitcea1dc279848f308d85ea34517fca2566861e40f (patch)
tree39bbacd217d22e791059e79d5cffaf1b646db44c /src
parent18070e08c5ec5048335df96e36019a6c778091e6 (diff)
downloadsqlite-cea1dc279848f308d85ea34517fca2566861e40f.tar.gz
sqlite-cea1dc279848f308d85ea34517fca2566861e40f.zip
Fix another bad assert() in btree - one that can be false on a corrupt database
file. FossilOrigin-Name: 89f0bbfde4d86a7b15e93aab9c487b4355c6fb2d
Diffstat (limited to 'src')
-rw-r--r--src/btree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/btree.c b/src/btree.c
index 6b7da394a..01ce974d7 100644
--- a/src/btree.c
+++ b/src/btree.c
@@ -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. */