summaryrefslogtreecommitdiffstats
path: root/src/regexp.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-02-16 17:07:47 +0100
committerBram Moolenaar <Bram@vim.org>2019-02-16 17:07:47 +0100
commit985079c514e9ab85598b7bca019c77d3e42526f5 (patch)
tree5e2dbfc05e6504a9e71d3683f69c215f7eddf0da /src/regexp.c
parent6982f42f33b2868e4b9884514cfe8e357b727498 (diff)
patch 8.1.0934: invalid memory access in search patternv8.1.0934
Problem: Invalid memory access in search pattern. (Kuang-che Wu) Solution: Check for incomplete equivalence class. (closes #3970)
Diffstat (limited to 'src/regexp.c')
-rw-r--r--src/regexp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/regexp.c b/src/regexp.c
index f06e15c833..30a604b236 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -730,7 +730,7 @@ get_equi_class(char_u **pp)
int l = 1;
char_u *p = *pp;
- if (p[1] == '=')
+ if (p[1] == '=' && p[2] != NUL)
{
if (has_mbyte)
l = (*mb_ptr2len)(p + 2);