mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-01 06:27:03 +03:00
Have sqlite3_value/column_text/blob_v2() return MISUSE for a NULL input object or output target only if SQLITE_ENABLE_API_ARMOR is in effect, for consistency with their sibling APIs.
FossilOrigin-Name: 6290a8eaddd97acd02ee417e28c2815e5f3af67acdfc1d97a2cd88b0aee823c0
This commit is contained in:
@ -3415,6 +3415,9 @@ globalThis.sqlite3InitModule = sqlite3InitModule;
|
||||
checkRc('SQLITE_OK', "column null pnOut",
|
||||
capi.sqlite3_column_text_v2(q, 1, ppOut, 0, 0));
|
||||
|
||||
/* The MISUSE returns only apply because we build with
|
||||
SQLITE_ENABLE_API_ARMOR. Without API_ARMOR, these result in
|
||||
null pointer dereferences. */
|
||||
checkRc('SQLITE_MISUSE', "value null ppOut",
|
||||
capi.sqlite3_value_text_v2(sv, 0, pnOut, 0));
|
||||
checkRc('SQLITE_MISUSE', "value null arg0",
|
||||
|
Reference in New Issue
Block a user