0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 7.4.820

Problem:    Invalid memory access in file_pat_to_reg_pat.
Solution:   Avoid looking before the start of a string. (Dominique Pelle)
This commit is contained in:
Bram Moolenaar
2015-08-11 18:45:48 +02:00
parent 901e58c243
commit 8fee878fe2
2 changed files with 3 additions and 1 deletions

View File

@@ -10210,7 +10210,7 @@ file_pat_to_reg_pat(pat, pat_end, allow_dirs, no_bslash)
else else
reg_pat[i++] = '^'; reg_pat[i++] = '^';
endp = pat_end - 1; endp = pat_end - 1;
if (*endp == '*') if (endp >= pat && *endp == '*')
{ {
while (endp - pat > 0 && *endp == '*') while (endp - pat > 0 && *endp == '*')
endp--; endp--;

View File

@@ -741,6 +741,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
820,
/**/ /**/
819, 819,
/**/ /**/