Patch 8.1.1409
Problem: Coverity warns for using uninitialized memory.
Solution: Add a condition to clearing the growarray.
Files: src/json.c
*** ../vim-8.1.1408/src/json.c 2019-05-19 19:59:30.164255569 +0200
--- src/json.c 2019-05-27 20:00:06.682014049 +0200
***************
*** 455,461 ****
STR2NR_HEX + STR2NR_FORCE, &nr, NULL, 4, TRUE);
if (len == 0)
{
! ga_clear(&ga);
return FAIL;
}
p += len + 2;
--- 455,462 ----
STR2NR_HEX + STR2NR_FORCE, &nr, NULL, 4, TRUE);
if (len == 0)
{
! if (res != NULL)
! ga_clear(&ga);
return FAIL;
}
p += len + 2;
***************
*** 471,477 ****
STR2NR_HEX + STR2NR_FORCE, &nr2, NULL, 4, TRUE);
if (len == 0)
{
! ga_clear(&ga);
return FAIL;
}
if (0xdc00 <= nr2 && nr2 <= 0xdfff)
--- 472,479 ----
STR2NR_HEX + STR2NR_FORCE, &nr2, NULL, 4, TRUE);
if (len == 0)
{
! if (res != NULL)
! ga_clear(&ga);
return FAIL;
}
if (0xdc00 <= nr2 && nr2 <= 0xdfff)
***************
*** 484,489 ****
--- 486,492 ----
if (res != NULL)
{
char_u buf[NUMBUFLEN];
+
buf[utf_char2bytes((int)nr, buf)] = NUL;
ga_concat(&ga, buf);
}
*** ../vim-8.1.1408/src/version.c 2019-05-27 10:04:37.530426996 +0200
--- src/version.c 2019-05-27 20:01:01.001703887 +0200
***************
*** 769,770 ****
--- 769,772 ----
{ /* Add new patch number below this line */
+ /**/
+ 1409,
/**/
--
A day without sunshine is like, well, night.
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language --
http://www.Zimbu.org ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///