1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Avoid passing (signed char) values directly to isspace(), isalnum() or isdigit() in json1.c. Cast the value to (unsigned char) first.

FossilOrigin-Name: 6713e35b8a8c997aa2717e86ce6dcd63bb993477
This commit is contained in:
dan
2015-09-17 17:21:09 +00:00
parent cf346d7a9c
commit 2e8f5517f7
4 changed files with 35 additions and 20 deletions

View File

@@ -278,4 +278,11 @@ do_execsql_test json102-1132 {
} {123}
} ;# end ifcapable vtab
#-------------------------------------------------------------------------
# Test that json_valid() correctly identifies non-ascii range
# characters as non-whitespace.
#
do_execsql_test json102-1201 { SELECT json_valid(char(32) || '"xyz"') } 1
do_execsql_test json102-1202 { SELECT json_valid(char(200) || '"xyz"') } 0
finish_test