summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-02-28 15:21:13 +0100
committerBram Moolenaar <Bram@vim.org>2016-02-28 15:21:13 +0100
commit80e78847395b5c8ada7861674774d81bd0a42789 (patch)
treed888b4d1ed9fac19257d81972b2e60286a662d4c
parentb36287283781e09d8874157b9d9bdc5243a2f319 (diff)
downloadvim-git-80e78847395b5c8ada7861674774d81bd0a42789.tar.gz
patch 7.4.1446v7.4.1446
Problem: Crash when using json_decode(). Solution: Terminate string with a NUL byte.
-rw-r--r--src/json.c1
-rw-r--r--src/version.c2
2 files changed, 3 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)
diff --git a/src/version.c b/src/version.c
index ffb280480..d13cfb7da 100644
--- a/src/version.c
+++ b/src/version.c
@@ -744,6 +744,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1446,
+/**/
1445,
/**/
1444,