comparison src/buffer.c @ 28829:2d0bd5601c30 v8.2.4938

patch 8.2.4938: crash when matching buffer with invalid pattern Commit: https://github.com/vim/vim/commit/a59f2dfd0cf9ee1a584d3de5b7c2d47648e79060 Author: Bram Moolenaar <Bram@vim.org> Date: Wed May 11 11:42:28 2022 +0100 patch 8.2.4938: crash when matching buffer with invalid pattern Problem: Crash when matching buffer with invalid pattern. Solution: Check for NULL regprog.
author Bram Moolenaar <Bram@vim.org>
date Wed, 11 May 2022 12:45:04 +0200
parents bd5b6ac5998f
children c3570bdc93eb
comparison
equal deleted inserted replaced
28828:f4d6061c882f 28829:2d0bd5601c30
2930 { 2930 {
2931 char_u *match; 2931 char_u *match;
2932 2932
2933 // First try the short file name, then the long file name. 2933 // First try the short file name, then the long file name.
2934 match = fname_match(rmp, buf->b_sfname, ignore_case); 2934 match = fname_match(rmp, buf->b_sfname, ignore_case);
2935 if (match == NULL) 2935 if (match == NULL && rmp->regprog != NULL)
2936 match = fname_match(rmp, buf->b_ffname, ignore_case); 2936 match = fname_match(rmp, buf->b_ffname, ignore_case);
2937 2937
2938 return match; 2938 return match;
2939 } 2939 }
2940 2940