comparison src/regexp.c @ 15860:9cd9bf2897de v8.1.0937

patch 8.1.0937: invalid memory access in search pattern commit https://github.com/vim/vim/commit/f1b57ab2ab18032d19f64bff7d22f3adb3fe93f7 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 17 13:53:34 2019 +0100 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)
author Bram Moolenaar <Bram@vim.org>
date Sun, 17 Feb 2019 14:00:06 +0100
parents e44b7caaf373
children ff00d207cc5e
comparison
equal deleted inserted replaced
15859:e8fef9635b72 15860:9cd9bf2897de
1109 { 1109 {
1110 int c; 1110 int c;
1111 int l = 1; 1111 int l = 1;
1112 char_u *p = *pp; 1112 char_u *p = *pp;
1113 1113
1114 if (p[0] != NUL && p[1] == '.') 1114 if (p[0] != NUL && p[1] == '.' && p[2] != NUL)
1115 { 1115 {
1116 if (has_mbyte) 1116 if (has_mbyte)
1117 l = (*mb_ptr2len)(p + 2); 1117 l = (*mb_ptr2len)(p + 2);
1118 if (p[l + 2] == '.' && p[l + 3] == ']') 1118 if (p[l + 2] == '.' && p[l + 3] == ']')
1119 { 1119 {