Hi. I'm trying to develop my own encrypting VFS (n the context of developing a Go driver). I was looking into your code for inspiration, and have a few comments/concerns.
Have you tested this branch?
|
else if (flags & SQLITE_OPEN_SUBJOURNAL) |
|
{ |
|
const char* dbFileName = sqlite3_filename_database(zName); |
|
mcFile->pMainDb = mcFindDbMainFileName(mcFile->pVfsMC, dbFileName); |
|
mcFile->zFileName = zName; |
|
SQLITE3MC_DEBUG_LOG("mcVfsOpen SUB Journal: mcFile=%p fileName=%s dbFileName=%s\n", mcFile, mcFile->zFileName, dbFileName); |
|
} |
I… don't think you can do this: sqlite3_filename_database is only safe to call with a main database, journal, or WAL name? None of the other kinds of files are safe to call this, and can corrupt memory…
Hi. I'm trying to develop my own encrypting VFS (n the context of developing a Go driver). I was looking into your code for inspiration, and have a few comments/concerns.
Have you tested this branch?
SQLite3MultipleCiphers/src/sqlite3mc_vfs.c
Lines 435 to 441 in 80722b0
I… don't think you can do this:
sqlite3_filename_databaseis only safe to call with a main database, journal, or WAL name? None of the other kinds of files are safe to call this, and can corrupt memory…