mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Fix a problem that could cause a crash in sqlite3BtreeDelete() when operating on a corrupt database file.
FossilOrigin-Name: 6c6334660dfe81cc33a14b87b25d748b1c98b0702b7bc6db2e3ced16dc992740
This commit is contained in:
@@ -9114,7 +9114,8 @@ int sqlite3BtreeDelete(BtCursor *pCur, u8 flags){
|
||||
assert( (flags & ~(BTREE_SAVEPOSITION | BTREE_AUXDELETE))==0 );
|
||||
if( pCur->eState==CURSOR_REQUIRESEEK ){
|
||||
rc = btreeRestoreCursorPosition(pCur);
|
||||
if( rc ) return rc;
|
||||
assert( rc!=SQLITE_OK || CORRUPT_DB || pCur->eState==CURSOR_VALID );
|
||||
if( rc || pCur->eState!=CURSOR_VALID ) return rc;
|
||||
}
|
||||
assert( CORRUPT_DB || pCur->eState==CURSOR_VALID );
|
||||
|
||||
|
Reference in New Issue
Block a user