mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.4938: crash when matching buffer with invalid pattern
Problem: Crash when matching buffer with invalid pattern. Solution: Check for NULL regprog.
This commit is contained in:
@@ -2932,7 +2932,7 @@ buflist_match(
|
||||
|
||||
// First try the short file name, then the long file name.
|
||||
match = fname_match(rmp, buf->b_sfname, ignore_case);
|
||||
if (match == NULL)
|
||||
if (match == NULL && rmp->regprog != NULL)
|
||||
match = fname_match(rmp, buf->b_ffname, ignore_case);
|
||||
|
||||
return match;
|
||||
|
Reference in New Issue
Block a user