preserve embedded NUL bytes in custom function text values

This commit is contained in:
dxbjavid
2026-06-09 16:29:57 +05:30
parent c63653b7ff
commit 6b68c20301
3 changed files with 48 additions and 6 deletions

View File

@@ -220,8 +220,8 @@ _sqlite3_prepare_v2_internal(sqlite3 *db, const char *zSql, int nBytes, sqlite3_
}
#endif
void _sqlite3_result_text(sqlite3_context* ctx, const char* s) {
sqlite3_result_text(ctx, s, -1, &free);
void _sqlite3_result_text(sqlite3_context* ctx, const char* s, int n) {
sqlite3_result_text(ctx, s, n, &free);
}
void _sqlite3_result_blob(sqlite3_context* ctx, const void* b, int l) {