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 "[email protected]" and refer to your
     children as "forked processes."

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            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/20220511104300.811E81C0D49%40moolenaar.net.

Raspunde prin e-mail lui