mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Fix a slightly incorrect corruption detection branch in the btree logic.
FossilOrigin-Name: 9191ff670cb7f36e0b2dac4a22888679b639845687aef8edcc3c05e35ba71eda
This commit is contained in:
@@ -6226,7 +6226,9 @@ static int clearCell(
|
||||
if( pInfo->nLocal==pInfo->nPayload ){
|
||||
return SQLITE_OK; /* No overflow pages. Return without doing anything */
|
||||
}
|
||||
if( pCell+pInfo->nSize-1 > pPage->aData+pPage->maskPage ){
|
||||
testcase( pCell + pInfo->nSize == pPage->aDataEnd );
|
||||
testcase( pCell + (pInfo->nSize-1) == pPage->aDataEnd );
|
||||
if( pCell + pInfo->nSize > pPage->aDataEnd ){
|
||||
/* Cell extends past end of page */
|
||||
return SQLITE_CORRUPT_PAGE(pPage);
|
||||
}
|
||||
|
Reference in New Issue
Block a user