changeset 8308:c1f29c1a968a v7.4.1446

commit https://github.com/vim/vim/commit/80e78847395b5c8ada7861674774d81bd0a42789 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 28 15:21:13 2016 +0100 patch 7.4.1446 Problem: Crash when using json_decode(). Solution: Terminate string with a NUL byte.
author Christian Brabandt <cb@256bit.org>
date Sun, 28 Feb 2016 15:30:05 +0100
parents 702fdaf67f99
children 9df48ab0f290
files src/json.c src/version.c
diffstat 2 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/json.c
+++ b/src/json.c
@@ -659,6 +659,7 @@ json_decode_string(js_read_T *reader, ty
 	++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)
--- 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,