Mercurial > vim
diff src/testdir/test_json.vim @ 21275:c14e628cd4bb v8.2.1188
patch 8.2.1188: memory leak with invalid json input
Commit: https://github.com/vim/vim/commit/6d3a7213f58da834b0fc869d05f87e86010c66cf
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jul 12 14:34:00 2020 +0200
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 https://github.com/vim/vim/issues/6443,
closes #6442)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 12 Jul 2020 14:45:03 +0200 |
parents | 6a4806e326dd |
children | 08940efa6b4e |
line wrap: on
line diff
--- a/src/testdir/test_json.vim +++ b/src/testdir/test_json.vim @@ -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,,,]'