1
0
forked from aniani/vim

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
reg_pat[i++] = '^';
endp = pat_end - 1;
if (*endp == '*')
if (endp >= pat && *endp == '*')
{
while (endp - pat > 0 && *endp == '*')
endp--;

View File

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