aboutsummaryrefslogtreecommitdiff
path: root/src/sqlite3_utils.hpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-01-31 11:21:43 +0100
committerEven Rouault <even.rouault@spatialys.com>2020-01-31 11:21:43 +0100
commitee06c659f39c29b9a7dc47af687664d31cc5fc14 (patch)
tree1c0e29789f55f1945d36c7aade8dbdebed23dc2e /src/sqlite3_utils.hpp
parenta1b1c4312e1270b2f5dcb44e2ba2727711cbb80f (diff)
downloadPROJ-ee06c659f39c29b9a7dc47af687664d31cc5fc14.tar.gz
PROJ-ee06c659f39c29b9a7dc47af687664d31cc5fc14.zip
Fix ASAN issue with SQLite3VFS class (fixes #1901)
Diffstat (limited to 'src/sqlite3_utils.hpp')
-rw-r--r--src/sqlite3_utils.hpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/sqlite3_utils.hpp b/src/sqlite3_utils.hpp
index ef141d1f..42ec33af 100644
--- a/src/sqlite3_utils.hpp
+++ b/src/sqlite3_utils.hpp
@@ -39,10 +39,20 @@ NS_PROJ_START
//! @cond Doxygen_Suppress
+// ---------------------------------------------------------------------------
+
+struct pj_sqlite3_vfs : public sqlite3_vfs {
+ std::string namePtr{};
+ bool fakeSync = false;
+ bool fakeLock = false;
+};
+
+// ---------------------------------------------------------------------------
+
class SQLite3VFS {
- sqlite3_vfs *vfs_ = nullptr;
+ pj_sqlite3_vfs *vfs_ = nullptr;
- explicit SQLite3VFS(sqlite3_vfs *vfs);
+ explicit SQLite3VFS(pj_sqlite3_vfs *vfs);
SQLite3VFS(const SQLite3VFS &) = delete;
SQLite3VFS &operator=(const SQLite3VFS &) = delete;