diff options
author | Bram Moolenaar <Bram@vim.org> | 2015-08-11 16:20:05 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2015-08-11 16:20:05 +0200 |
commit | 2288afed428d29ce2e464964df4c5a757281e70e (patch) | |
tree | 845eccdbcd454e41a429f8a40cc68e5221448eca | |
parent | dd8a5286e191d23410c5970a0f17f01c7ff1211b (diff) | |
download | vim-git-2288afed428d29ce2e464964df4c5a757281e70e.tar.gz |
patch 7.4.817v7.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)
-rw-r--r-- | src/fileio.c | 4 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/fileio.c b/src/fileio.c index b1bcfb536..973e8ca0e 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -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] == '{') { diff --git a/src/version.c b/src/version.c index e5f2b9482..177b59102 100644 --- 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 */ /**/ + 817, +/**/ 816, /**/ 815, |