diff options
author | drh <drh@noemail.net> | 2015-05-22 23:39:29 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-05-22 23:39:29 +0000 |
commit | cea1dc279848f308d85ea34517fca2566861e40f (patch) | |
tree | 39bbacd217d22e791059e79d5cffaf1b646db44c /src/btree.c | |
parent | 18070e08c5ec5048335df96e36019a6c778091e6 (diff) | |
download | sqlite-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/btree.c')
-rw-r--r-- | src/btree.c | 3 |
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. */ |