sqlite3_db_config() not using nullptr: cannot pass object of non-POD type 'std::__1::nullptr_t' through variadic function

This commit is contained in:
Sébastien Rombauts 2017-12-18 16:23:45 +01:00
parent 94b75d56c0
commit b4a932e48a

View File

@ -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. // 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() // 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. // 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 #else
int ret = sqlite3_enable_load_extension(mpSQLite, 1); int ret = sqlite3_enable_load_extension(mpSQLite, 1);
#endif #endif