mirror of
https://github.com/sqlite/sqlite.git
synced 2026-01-06 08:01:16 +03:00
Fix an off-by-one error (really off-by-2 in this case) in the buffer
resize logic of json1. FossilOrigin-Name: d2a027372a5a6efc0f9b6f605093d865ae1c6788
This commit is contained in:
@@ -285,4 +285,13 @@ do_execsql_test json102-1132 {
|
||||
do_execsql_test json102-1201 { SELECT json_valid(char(32) || '"xyz"') } 1
|
||||
do_execsql_test json102-1202 { SELECT json_valid(char(200) || '"xyz"') } 0
|
||||
|
||||
# Off-by-one error in jsonAppendString()
|
||||
#
|
||||
for {set i 0} {$i<100} {incr i} {
|
||||
set str abcdef[string repeat \" [expr {$i+50}]]uvwxyz
|
||||
do_test json102-[format %d [expr {$i+1300}]] {
|
||||
db eval {SELECT json_extract(json_array($::str),'$[0]')==$::str}
|
||||
} {1}
|
||||
}
|
||||
|
||||
finish_test
|
||||
|
||||
Reference in New Issue
Block a user