mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Detect zero-length free slots on btree pages and report that as corruption.
FossilOrigin-Name: c4f0568fde1d4070e7522ec36c0958be7426076002a7fa2da12a46411ab2e92d
This commit is contained in:
@@ -1573,7 +1573,7 @@ static u8 *pageFindSlot(MemPage *pPg, int nByte, int *pRc){
|
||||
}
|
||||
iAddr = pc;
|
||||
pc = get2byte(&aData[pc]);
|
||||
if( pc<iAddr+size ){
|
||||
if( pc<=iAddr+size ){
|
||||
if( pc ){
|
||||
/* The next slot in the chain is not past the end of the current slot */
|
||||
*pRc = SQLITE_CORRUPT_PAGE(pPg);
|
||||
|
Reference in New Issue
Block a user