1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Ensure that the OP_Prev opcode verifies that content has not been deleted

out from under the cursor.  Fix for ticket [209d31e3161b9e9ff].

FossilOrigin-Name: 414f0d6a647a4d040b5463c73c5e15e699d85b4c
This commit is contained in:
drh
2014-09-29 15:00:28 +00:00
parent 843e4cdea9
commit 7682a476f6
4 changed files with 22 additions and 11 deletions

View File

@@ -4985,8 +4985,7 @@ static SQLITE_NOINLINE int btreePrevious(BtCursor *pCur, int *pRes){
assert( (pCur->curFlags & (BTCF_AtLast|BTCF_ValidOvfl|BTCF_ValidNKey))==0 );
assert( pCur->info.nSize==0 );
if( pCur->eState!=CURSOR_VALID ){
assert( pCur->eState>=CURSOR_REQUIRESEEK );
rc = btreeRestoreCursorPosition(pCur);
rc = restoreCursorPosition(pCur);
if( rc!=SQLITE_OK ){
return rc;
}