diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-02-28 15:21:13 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-02-28 15:21:13 +0100 |
commit | 80e78847395b5c8ada7861674774d81bd0a42789 (patch) | |
tree | d888b4d1ed9fac19257d81972b2e60286a662d4c /src/json.c | |
parent | b36287283781e09d8874157b9d9bdc5243a2f319 (diff) | |
download | vim-git-80e78847395b5c8ada7861674774d81bd0a42789.tar.gz |
patch 7.4.1446v7.4.1446
Problem: Crash when using json_decode().
Solution: Terminate string with a NUL byte.
Diffstat (limited to 'src/json.c')
-rw-r--r-- | src/json.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/json.c b/src/json.c index d5019285b..cf887e5af 100644 --- a/src/json.c +++ b/src/json.c @@ -659,6 +659,7 @@ json_decode_string(js_read_T *reader, typval_T *res) ++reader->js_used; if (res != NULL) { + ga_append(&ga, NUL); res->v_type = VAR_STRING; #if defined(FEAT_MBYTE) && defined(USE_ICONV) if (!enc_utf8) |