From f1b57ab2ab18032d19f64bff7d22f3adb3fe93f7 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 17 Feb 2019 13:53:34 +0100 Subject: 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 #3985) --- src/regexp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/regexp.c') 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); -- cgit v1.2.1