To: vim_dev@googlegroups.com Subject: Patch 8.2.4938 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4938 Problem: Crash when matching buffer with invalid pattern. Solution: Check for NULL regprog. Files: src/buffer.c, src/testdir/test_buffer.vim *** ../vim-8.2.4937/src/buffer.c 2022-05-09 21:03:30.777853315 +0100 --- src/buffer.c 2022-05-11 11:18:35.917407492 +0100 *************** *** 2932,2938 **** // First try the short file name, then the long file name. match = fname_match(rmp, buf->b_sfname, ignore_case); ! if (match == NULL) match = fname_match(rmp, buf->b_ffname, ignore_case); return match; --- 2932,2938 ---- // First try the short file name, then the long file name. match = fname_match(rmp, buf->b_sfname, ignore_case); ! if (match == NULL && rmp->regprog != NULL) match = fname_match(rmp, buf->b_ffname, ignore_case); return match; *** ../vim-8.2.4937/src/testdir/test_buffer.vim 2022-05-07 11:28:02.189974238 +0100 --- src/testdir/test_buffer.vim 2022-05-11 11:23:37.393168207 +0100 *************** *** 415,420 **** --- 415,424 ---- vsplit 0000000 silent! buf [0--]\&\zs*\zs*e bwipe! + + vsplit 00000000000000000000000000 + silent! buf [0--]\&\zs*\zs*e + bwipe! endfunc " Test for the 'maxmem' and 'maxmemtot' options *** ../vim-8.2.4937/src/version.c 2022-05-10 21:11:09.324126665 +0100 --- src/version.c 2022-05-11 11:19:40.817349798 +0100 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 4938, /**/ -- hundred-and-one symptoms of being an internet addict: 170. You introduce your wife as "my_lady@home.wife" and refer to your children as "forked processes." /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///