From b4a932e48ab42bfc7045a443bce41bbea8bc4794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Rombauts?= Date: Mon, 18 Dec 2017 16:23:45 +0100 Subject: [PATCH] sqlite3_db_config() not using nullptr: cannot pass object of non-POD type 'std::__1::nullptr_t' through variadic function --- src/Database.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Database.cpp b/src/Database.cpp index 2f87d16..3b8f24f 100644 --- a/src/Database.cpp +++ b/src/Database.cpp @@ -222,7 +222,8 @@ void Database::loadExtension(const char* apExtensionName, const char *apEntryPoi // It is recommended that the SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION method be used to enable only this interface. // The use of the sqlite3_enable_load_extension() interface should be avoided to keep the SQL load_extension() // disabled and prevent SQL injections from giving attackers access to extension loading capabilities. - int ret = sqlite3_db_config(mpSQLite, SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, 1, nullptr); + // (NOTE: not using nullptr: cannot pass object of non-POD type 'std::__1::nullptr_t' through variadic function) + int ret = sqlite3_db_config(mpSQLite, SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, 1, NULL); // NOTE: not using nullptr #else int ret = sqlite3_enable_load_extension(mpSQLite, 1); #endif