diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-02-17 19:36:21 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-02-17 19:37:44 -0500 |
commit | 486234ab3db56621767bea18a1783d289b660764 (patch) | |
tree | d0913718fedb02a64bb88c1c9db90895631a53f5 /src/nvim/regexp.c | |
parent | 279ecaff00b5f7fed25cba0d6f131cb042420b20 (diff) | |
download | rneovim-486234ab3db56621767bea18a1783d289b660764.tar.gz rneovim-486234ab3db56621767bea18a1783d289b660764.tar.bz2 rneovim-486234ab3db56621767bea18a1783d289b660764.zip |
vim-patch:8.1.0937: invalid memory access in search pattern
Problem: Invalid memory access in search pattern. (Kuang-che Wu)
Solution: Check for incomplete collation element. (Dominique Pelle,
closes vim/vim#3985)
https://github.com/vim/vim/commit/f1b57ab2ab18032d19f64bff7d22f3adb3fe93f7
Diffstat (limited to 'src/nvim/regexp.c')
-rw-r--r-- | src/nvim/regexp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c index b7fc39fdb3..53479294de 100644 --- a/src/nvim/regexp.c +++ b/src/nvim/regexp.c @@ -1103,7 +1103,7 @@ static int 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) { l = utfc_ptr2len(p + 2); if (p[l + 2] == '.' && p[l + 3] == ']') { c = utf_ptr2char(p + 2); |