mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Ensure that the VFS wrapper in the recover extension does not attempt to invoke undefined methods on the underlying VFS.
FossilOrigin-Name: 347c575108bc8112613a02afda1247bdbed24c15def7eb412d0b27aba047715b
This commit is contained in:
@ -2498,8 +2498,10 @@ static void recoverInstallWrapper(sqlite3_recover *p){
|
||||
sqlite3_file_control(p->dbIn, p->zDb, SQLITE_FCNTL_FILE_POINTER, (void*)&pFd);
|
||||
assert( pFd==0 || pFd->pMethods!=&recover_methods );
|
||||
if( pFd ){
|
||||
int iVersion = 1 + (pFd->pMethods->iVersion>1 && pFd->pMethods->xShmMap!=0);
|
||||
recover_g.pMethods = pFd->pMethods;
|
||||
recover_g.p = p;
|
||||
recover_methods.iVersion = iVersion;
|
||||
pFd->pMethods = &recover_methods;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user