mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Have the dbstat module dequote any argument passed to the CREATE VIRTUAL TABLE statement before attempting to match it against the names of attached databases.
FossilOrigin-Name: e60461e984b8df09256bb0d733dbfae52568a145
This commit is contained in:
@@ -149,7 +149,11 @@ static int statConnect(
|
||||
int iDb;
|
||||
|
||||
if( argc>=4 ){
|
||||
iDb = sqlite3FindDbName(db, argv[3]);
|
||||
char *zDb = sqlite3DbStrDup(db, argv[3]);
|
||||
if( zDb==0 ) return SQLITE_NOMEM;
|
||||
sqlite3Dequote(zDb);
|
||||
iDb = sqlite3FindDbName(db, zDb);
|
||||
sqlite3DbFree(db, zDb);
|
||||
if( iDb<0 ){
|
||||
*pzErr = sqlite3_mprintf("no such database: %s", argv[3]);
|
||||
return SQLITE_ERROR;
|
||||
|
||||
Reference in New Issue
Block a user