Patch 8.2.0394

5 views
Skip to first unread message

Bram Moolenaar

unread,
Mar 16, 2020, 3:28:23 PM3/16/20
to vim...@googlegroups.com

Patch 8.2.0394
Problem: Coverity complains about using NULL pointer.
Solution: Use empty string when option value is NULL.
Files: src/optionstr.c


*** ../vim-8.2.0393/src/optionstr.c 2020-02-01 21:57:00.848520936 +0100
--- src/optionstr.c 2020-03-16 20:26:26.979696768 +0100
***************
*** 500,506 ****
if (is_hidden_option(opt_idx)) // don't set hidden option
return NULL;

! s = vim_strsave(value);
if (s != NULL)
{
varp = (char_u **)get_option_varp_scope(opt_idx,
--- 500,506 ----
if (is_hidden_option(opt_idx)) // don't set hidden option
return NULL;

! s = vim_strsave(value == NULL ? (char_u *)"" : value);
if (s != NULL)
{
varp = (char_u **)get_option_varp_scope(opt_idx,
*** ../vim-8.2.0393/src/version.c 2020-03-16 20:07:13.359874451 +0100
--- src/version.c 2020-03-16 20:27:18.499512245 +0100
***************
*** 740,741 ****
--- 740,743 ----
{ /* Add new patch number below this line */
+ /**/
+ 394,
/**/

--
MAN: Fetchez la vache!
GUARD: Quoi?
MAN: Fetchez la vache!
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// 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 ///
Reply all
Reply to author
Forward
0 new messages