mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Fix a case of a corrupt database causing SQLite to read from up to 4 bytes before the start of a memory allocation.
FossilOrigin-Name: 7d2c4f7b6695806ab8ce0c6f49d8bc1d77a4320b
This commit is contained in:
@@ -7777,6 +7777,7 @@ int sqlite3BtreeDelete(BtCursor *pCur){
|
||||
unsigned char *pTmp;
|
||||
|
||||
pCell = findCell(pLeaf, pLeaf->nCell-1);
|
||||
if( pCell<&pLeaf->aData[4] ) return SQLITE_CORRUPT_BKPT;
|
||||
nCell = cellSizePtr(pLeaf, pCell);
|
||||
assert( MX_CELL_SIZE(pBt) >= nCell );
|
||||
pTmp = pBt->pTmpSpace;
|
||||
|
Reference in New Issue
Block a user