diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-02-17 13:53:34 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-02-17 13:53:34 +0100 |
commit | f1b57ab2ab18032d19f64bff7d22f3adb3fe93f7 (patch) | |
tree | efdcc48f4367cf3a7954c300a1922e96ee9ff86a /src/regexp.c | |
parent | 55c77cf2ea9c15e1ec75d1faf702ec3c9e325271 (diff) | |
download | vim-git-f1b57ab2ab18032d19f64bff7d22f3adb3fe93f7.tar.gz |
patch 8.1.0937: invalid memory access in search patternv8.1.0937
Problem: Invalid memory access in search pattern. (Kuang-che Wu)
Solution: Check for incomplete collation element. (Dominique Pelle,
closes #3985)
Diffstat (limited to 'src/regexp.c')
-rw-r--r-- | src/regexp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/regexp.c b/src/regexp.c index 836204895..e37c06507 100644 --- a/src/regexp.c +++ b/src/regexp.c @@ -1111,7 +1111,7 @@ get_coll_element(char_u **pp) int l = 1; char_u *p = *pp; - if (p[0] != NUL && p[1] == '.') + if (p[0] != NUL && p[1] == '.' && p[2] != NUL) { if (has_mbyte) l = (*mb_ptr2len)(p + 2); |