1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Fix another bad assert() in btree - one that can be false on a corrupt database

file.

FossilOrigin-Name: 89f0bbfde4d86a7b15e93aab9c487b4355c6fb2d
This commit is contained in:
drh
2015-05-22 23:39:29 +00:00
parent 18070e08c5
commit cea1dc2798
3 changed files with 9 additions and 8 deletions

View 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. */