mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 17:36:29 +00:00
vim-patch:8.2.1364: invalid memory access when searching for raw string
Problem: Invalid memory access when searching for raw string.
Solution: Check for delimiter match before following quote. (closes vim/vim#6578)
282f9c64e5
This commit is contained in:
@@ -1612,8 +1612,9 @@ static bool find_rawstring_end(char_u *linep, pos_T *startpos, pos_T *endpos)
|
||||
if (lnum == endpos->lnum && (colnr_T)(p - line) >= endpos->col) {
|
||||
break;
|
||||
}
|
||||
if (*p == ')' && p[delim_len + 1] == '"'
|
||||
&& STRNCMP(delim_copy, p + 1, delim_len) == 0) {
|
||||
if (*p == ')'
|
||||
&& STRNCMP(delim_copy, p + 1, delim_len) == 0
|
||||
&& p[delim_len + 1] == '"') {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user