Closed sivukhin closed 3 months ago
SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION config verb require 2 additional arguments: on/off flag and pointer to the location where new state of the config will be written.
SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION
on/off
libsql misses last parameter which generally leads to UB and more specifically SEGFAULT under release builds (see https://github.com/tursodatabase/libsql/issues/1473)
libsql
This PR set second additional argument to null in order to comply with SQLite API specification.
See https://sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigenableloadextension for the config verb description
enable_disable_extension
Context
SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION
config verb require 2 additional arguments:on/off
flag and pointer to the location where new state of the config will be written.libsql
misses last parameter which generally leads to UB and more specifically SEGFAULT under release builds (see https://github.com/tursodatabase/libsql/issues/1473)This PR set second additional argument to null in order to comply with SQLite API specification.
See https://sqlite.org/c3ref/c_dbconfig_defensive.html#sqlitedbconfigenableloadextension for the config verb description
Testing
enable_disable_extension
test which just trigger the method (better to load extension too - but it's a bit harder to setup)