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

Fix a problem in sqlite3_snapshot_recover() introduced by the [8a6b0c24937e855b] merge.

FossilOrigin-Name: c2577eb0a4a627c65d675f1446514843486092be9cb271b682793a0107e496cd
This commit is contained in:
dan
2023-08-14 18:21:56 +00:00
parent 1f72b53461
commit 9541fbc283
3 changed files with 10 additions and 9 deletions

View File

@@ -3163,7 +3163,8 @@ static int walSnapshotRecover(
rc = walHashGet(pWal, walFramePage(i), &sLoc);
if( rc!=SQLITE_OK ) break;
pgno = sLoc.aPgno[i-sLoc.iZero];
assert( i - sLoc.iZero - 1 >=0 );
pgno = sLoc.aPgno[i-sLoc.iZero-1];
iDbOff = (i64)(pgno-1) * szPage;
if( iDbOff+szPage<=szDb ){