mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
More aggressive detection of database corruption in the rebuildPage() routine.
FossilOrigin-Name: a18c65068b16eae3c0725356d7f4775774b23e248c700cef8c15f23459fba68f
This commit is contained in:
@@ -7015,7 +7015,7 @@ static int rebuildPage(
|
||||
u8 *pCell = pCArray->apCell[i];
|
||||
u16 sz = pCArray->szCell[i];
|
||||
assert( sz>0 );
|
||||
if( SQLITE_WITHIN(pCell,aData,pEnd) ){
|
||||
if( SQLITE_WITHIN(pCell,aData+j,pEnd) ){
|
||||
if( ((uptr)(pCell+sz))>(uptr)pEnd ) return SQLITE_CORRUPT_BKPT;
|
||||
pCell = &pTmp[pCell - aData];
|
||||
}else if( (uptr)(pCell+sz)>(uptr)pSrcEnd
|
||||
|
Reference in New Issue
Block a user