To: vim_dev@googlegroups.com Subject: Patch 7.4.1682 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1682 Problem: Coverity: no check for NULL. Solution: Add check for invalid argument to assert_match(). Files: src/eval.c *** ../vim-7.4.1681/src/eval.c 2016-03-28 22:44:46.846956799 +0200 --- src/eval.c 2016-03-28 22:46:41.413791863 +0200 *************** *** 9580,9586 **** char_u *pat = get_tv_string_buf_chk(&argvars[0], buf1); char_u *text = get_tv_string_buf_chk(&argvars[1], buf2); ! if (!pattern_match(pat, text, FALSE)) { prepare_assert_error(&ga); fill_assert_error(&ga, &argvars[2], NULL, &argvars[0], &argvars[1], --- 9580,9588 ---- char_u *pat = get_tv_string_buf_chk(&argvars[0], buf1); char_u *text = get_tv_string_buf_chk(&argvars[1], buf2); ! if (pat == NULL || text == NULL) ! EMSG(_(e_invarg)); ! else if (!pattern_match(pat, text, FALSE)) { prepare_assert_error(&ga); fill_assert_error(&ga, &argvars[2], NULL, &argvars[0], &argvars[1], *** ../vim-7.4.1681/src/version.c 2016-03-28 22:44:46.846956799 +0200 --- src/version.c 2016-03-28 22:47:33.373263524 +0200 *************** *** 750,751 **** --- 750,753 ---- { /* Add new patch number below this line */ + /**/ + 1682, /**/ -- hundred-and-one symptoms of being an internet addict: 163. You go outside for the fresh air (at -30 degrees) but open the window first to hear new mail arrive. /// 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 ///