# HG changeset patch # User Bram Moolenaar # Date 1439311548 -7200 # Node ID bb44542231dc741cde6733a4c425fe0622027874 # Parent 19e7e0fce7a525c68261eaed1e76f93fb21b6973 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) diff --git a/src/fileio.c b/src/fileio.c --- a/src/fileio.c +++ b/src/fileio.c @@ -10210,7 +10210,7 @@ file_pat_to_reg_pat(pat, pat_end, allow_ else reg_pat[i++] = '^'; endp = pat_end - 1; - if (*endp == '*') + if (endp >= pat && *endp == '*') { while (endp - pat > 0 && *endp == '*') endp--; diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 820, +/**/ 819, /**/ 818,