aboutsummaryrefslogtreecommitdiff
path: root/src/sqlite3_utils.hpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-02-02 23:46:05 +0100
committerGitHub <noreply@github.com>2020-02-02 23:46:05 +0100
commit6aadc40eacfc9fb7e10f81d3fb640be532830e5b (patch)
treeeff1315511835350d75ce40e074aae1767dbc83f /src/sqlite3_utils.hpp
parent42035701c02d15d586e762afa1db5c8b5c9eac39 (diff)
parentee06c659f39c29b9a7dc47af687664d31cc5fc14 (diff)
downloadPROJ-6aadc40eacfc9fb7e10f81d3fb640be532830e5b.tar.gz
PROJ-6aadc40eacfc9fb7e10f81d3fb640be532830e5b.zip
Merge pull request #1902 from rouault/fix_asan_issue_sqlite3_vfs
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;