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

Update an assert() in btree.c that may fail with a corrupt database.

FossilOrigin-Name: d74bf88c5a027cf080a2892a3538fe5104952b5b3759a6eba1b1a98a75ddf5f4
This commit is contained in:
dan
2021-04-20 13:31:51 +00:00
parent 9da977f1a5
commit 5b482a9832
4 changed files with 76 additions and 11 deletions

View File

@@ -7822,7 +7822,7 @@ static int balance_nonroot(
b.szCell[b.nCell] = b.szCell[b.nCell] - leafCorrection;
if( !pOld->leaf ){
assert( leafCorrection==0 );
assert( pOld->hdrOffset==0 );
assert( pOld->hdrOffset==0 || CORRUPT_DB );
/* The right pointer of the child page pOld becomes the left
** pointer of the divider cell */
memcpy(b.apCell[b.nCell], &pOld->aData[8], 4);