commit | 985079c514e9ab85598b7bca019c77d3e42526f5 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Sat Feb 16 17:07:47 2019 +0100 |
committer | Bram Moolenaar <Bram@vim.org> | Sat Feb 16 17:07:47 2019 +0100 |
tree | 5e2dbfc05e6504a9e71d3683f69c215f7eddf0da | |
parent | 6982f42f33b2868e4b9884514cfe8e357b727498 [diff] [blame] |
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 #3970)
diff --git a/src/regexp.c b/src/regexp.c index f06e15c..30a604b 100644 --- a/src/regexp.c +++ b/src/regexp.c
@@ -730,7 +730,7 @@ int l = 1; char_u *p = *pp; - if (p[1] == '=') + if (p[1] == '=' && p[2] != NUL) { if (has_mbyte) l = (*mb_ptr2len)(p + 2);