comparison src/json.c @ 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 7fcf3f6020c1
children e70fa2e110ec
comparison
equal deleted inserted replaced
8307:702fdaf67f99 8308:c1f29c1a968a
657 if (*p == '"') 657 if (*p == '"')
658 { 658 {
659 ++reader->js_used; 659 ++reader->js_used;
660 if (res != NULL) 660 if (res != NULL)
661 { 661 {
662 ga_append(&ga, NUL);
662 res->v_type = VAR_STRING; 663 res->v_type = VAR_STRING;
663 #if defined(FEAT_MBYTE) && defined(USE_ICONV) 664 #if defined(FEAT_MBYTE) && defined(USE_ICONV)
664 if (!enc_utf8) 665 if (!enc_utf8)
665 { 666 {
666 vimconv_T conv; 667 vimconv_T conv;