mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Improved handling of NULL arguments to json_valid() and
json_error_position(). [forum:/forumpost/06c6334412|Forum post 06c6334412]. FossilOrigin-Name: ab78e6946ba8125a83ff155561adf9c8df4d1c09a645fce08c8245ddb08bfa3b
This commit is contained in:
@@ -2556,6 +2556,7 @@ static void jsonValidFunc(
|
||||
){
|
||||
JsonParse *p; /* The parse */
|
||||
UNUSED_PARAMETER(argc);
|
||||
if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return;
|
||||
p = jsonParseCached(ctx, argv, 0);
|
||||
if( p==0 || p->oom ){
|
||||
sqlite3_result_error_nomem(ctx);
|
||||
@@ -2601,6 +2602,7 @@ static void jsonErrorFunc(
|
||||
){
|
||||
JsonParse *p; /* The parse */
|
||||
UNUSED_PARAMETER(argc);
|
||||
if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return;
|
||||
p = jsonParseCached(ctx, argv, 0);
|
||||
if( p==0 || p->oom ){
|
||||
sqlite3_result_error_nomem(ctx);
|
||||
|
||||
Reference in New Issue
Block a user