1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Use SQLITE_WITHIN() for pointer range comparisons in some testing code.

FossilOrigin-Name: 7cacf4e954c8de5af5efb56d8271a5ac1edc1c04
This commit is contained in:
drh
2016-04-05 13:35:43 +00:00
parent cca6698408
commit 1c715f67b9
3 changed files with 8 additions and 8 deletions

View File

@@ -6708,7 +6708,7 @@ static int editPage(
for(i=0; i<nNew && !CORRUPT_DB; i++){
u8 *pCell = pCArray->apCell[i+iNew];
int iOff = get2byteAligned(&pPg->aCellIdx[i*2]);
if( pCell>=aData && pCell<&aData[pPg->pBt->usableSize] ){
if( SQLITE_WITHIN(pCell, aData, &aData[pPg->pBt->usableSize]) ){
pCell = &pTmp[pCell - aData];
}
assert( 0==memcmp(pCell, &aData[iOff],