0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 7.4.817

Problem:    Invalid memory access in file_pat_to_reg_pat().
Solution:   Use vim_isspace() instead of checking for a space only. (Dominique
            Pelle)
This commit is contained in:
Bram Moolenaar
2015-08-11 16:20:05 +02:00
parent dd8a5286e1
commit 2288afed42
2 changed files with 4 additions and 2 deletions

View File

@@ -10188,7 +10188,7 @@ file_pat_to_reg_pat(pat, pat_end, allow_dirs, no_bslash)
#endif
default:
size++;
# ifdef FEAT_MBYTE
# ifdef FEAT_MBYTE
if (enc_dbcs != 0 && (*mb_ptr2len)(p) > 1)
{
++p;
@@ -10277,7 +10277,7 @@ file_pat_to_reg_pat(pat, pat_end, allow_dirs, no_bslash)
reg_pat[i++] = '?';
else
if (*p == ',' || *p == '%' || *p == '#'
|| *p == ' ' || *p == '{' || *p == '}')
|| vim_isspace(*p) || *p == '{' || *p == '}')
reg_pat[i++] = *p;
else if (*p == '\\' && p[1] == '\\' && p[2] == '{')
{