To: vim_dev@googlegroups.com Subject: Patch 8.2.0394 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- Bram@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 ///