0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 7.4.1446

Problem:    Crash when using json_decode().
Solution:   Terminate string with a NUL byte.
This commit is contained in:
Bram Moolenaar
2016-02-28 15:21:13 +01:00
parent b362872837
commit 80e7884739
2 changed files with 3 additions and 0 deletions

View File

@@ -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)