mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
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)
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user