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 -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/201905271801.x4RI1xPJ008742%40masaka.moolenaar.net.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui