Problem: Invalid memory access in search pattern. (Kuang-che Wu)
Solution: Check for incomplete equivalence class. (closes #3970)
int l = 1;
char_u *p = *pp;
- if (p[1] == '=')
+ if (p[1] == '=' && p[2] != NUL)
{
if (has_mbyte)
l = (*mb_ptr2len)(p + 2);
" This will be slow...
call assert_fails('call search("\\v((n||<)+);")', 'E363:')
endfunc
+
+func Test_get_equi_class()
+ new
+ " Incomplete equivalence class caused invalid memory access
+ s/^/[[=
+ call assert_equal(1, search(getline(1)))
+endfunc
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 934,
/**/
933,
/**/