Skip to content

Commit 80e7884

Browse files
committed
patch 7.4.1446
Problem: Crash when using json_decode(). Solution: Terminate string with a NUL byte.
1 parent b362872 commit 80e7884

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/json.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,7 @@ json_decode_string(js_read_T *reader, typval_T *res)
659659
++reader->js_used;
660660
if (res != NULL)
661661
{
662+
ga_append(&ga, NUL);
662663
res->v_type = VAR_STRING;
663664
#if defined(FEAT_MBYTE) && defined(USE_ICONV)
664665
if (!enc_utf8)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,8 @@ static char *(features[]) =
743743

744744
static int included_patches[] =
745745
{ /* Add new patch number below this line */
746+
/**/
747+
1446,
746748
/**/
747749
1445,
748750
/**/

0 commit comments

Comments
 (0)