forked from aniani/vim
patch 8.2.1188: memory leak with invalid json input
Problem: Memory leak with invalid json input. Solution: Free all keys at the end. (Dominique Pellé, closes #6443, closes #6442)
This commit is contained in:
@@ -201,6 +201,8 @@ func Test_json_decode()
|
||||
call assert_fails('call json_decode("\"\\u111Z\"")', 'E491:')
|
||||
call assert_equal('[😂]', json_decode('"[\uD83D\uDE02]"'))
|
||||
call assert_equal('a😂b', json_decode('"a\uD83D\uDE02b"'))
|
||||
|
||||
call assert_fails('call json_decode("{\"\":{\"\":{")', 'E491:')
|
||||
endfunc
|
||||
|
||||
let s:jsl5 = '[7,,,]'
|
||||
|
||||
Reference in New Issue
Block a user