diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-02-17 19:34:19 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-02-17 19:35:41 -0500 |
commit | 279ecaff00b5f7fed25cba0d6f131cb042420b20 (patch) | |
tree | 5f047a84fec520ba9a8f53bda1a02a1b34a51e5b /src/nvim/regexp.c | |
parent | d8b4fb7838eb6e9ff907bb014144fef9b6cd2933 (diff) | |
download | rneovim-279ecaff00b5f7fed25cba0d6f131cb042420b20.tar.gz rneovim-279ecaff00b5f7fed25cba0d6f131cb042420b20.tar.bz2 rneovim-279ecaff00b5f7fed25cba0d6f131cb042420b20.zip |
vim-patch:8.1.0934: invalid memory access in search pattern
Problem: Invalid memory access in search pattern. (Kuang-che Wu)
Solution: Check for incomplete equivalence class. (closes vim/vim#3970)
https://github.com/vim/vim/commit/985079c514e9ab85598b7bca019c77d3e42526f5
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 a70b150e9b..b7fc39fdb3 100644 --- a/src/nvim/regexp.c +++ b/src/nvim/regexp.c @@ -772,7 +772,7 @@ static int get_equi_class(char_u **pp) int l = 1; char_u *p = *pp; - if (p[1] == '=') { + if (p[1] == '=' && p[2] != NUL) { l = (*mb_ptr2len)(p + 2); if (p[l + 2] == '=' && p[l + 3] == ']') { c = utf_ptr2char(p + 2); |