1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

In the zipvfile extension (which is not part of the SQLite amalgamation, but

which is included in the CLI by default) ensure that fopen() is not invoked
using a NULL filename.  Fix for the issue reported by
[forum:/forumpost/d1c96a9032e564f8|forum post d1c96a9032e564f8].

FossilOrigin-Name: d32757ddf5d311b6f62545c861fd606244e03f02cb2e317c1131ee6b80c2299c
This commit is contained in:
drh
2023-01-05 01:26:58 +00:00
parent e0237c00e1
commit b8a655beeb
4 changed files with 18 additions and 10 deletions

View File

@ -1285,7 +1285,7 @@ static int zipfileFilter(
}
if( 0==pTab->pWriteFd && 0==bInMemory ){
pCsr->pFile = fopen(zFile, "rb");
pCsr->pFile = zFile ? fopen(zFile, "rb") : 0;
if( pCsr->pFile==0 ){
zipfileCursorErr(pCsr, "cannot open file: %s", zFile);
rc = SQLITE_ERROR;