mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Fix seg-fault upon appendvfs attempt to open non-existent file.
FossilOrigin-Name: 04f6439f4d9b9b1f717c3aa243a93585df7e7844c216fab5d15bebb050ab00b1
This commit is contained in:
@ -530,9 +530,11 @@ static int apndOpen(
|
||||
rc = pBaseVfs->xOpen(pBaseVfs, zName, pBaseFile, flags, pOutFlags);
|
||||
if( rc==SQLITE_OK ){
|
||||
rc = pBaseFile->pMethods->xFileSize(pBaseFile, &sz);
|
||||
if( rc ){
|
||||
pBaseFile->pMethods->xClose(pBaseFile);
|
||||
}
|
||||
}
|
||||
if( rc ){
|
||||
pBaseFile->pMethods->xClose(pBaseFile);
|
||||
pFile->pMethods = 0;
|
||||
return rc;
|
||||
}
|
||||
|
Reference in New Issue
Block a user