0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 8.2.4925: trailing backslash may cause reading past end of line

Problem:    Trailing backslash may cause reading past end of line.
Solution:   Check for NUL after backslash.
This commit is contained in:
Bram Moolenaar
2022-05-09 13:15:07 +01:00
parent 0519ce0039
commit 53a70289c2
3 changed files with 15 additions and 1 deletions

View File

@@ -1664,7 +1664,11 @@ find_next_quote(
if (c == NUL)
return -1;
else if (escape != NULL && vim_strchr(escape, c))
{
++col;
if (line[col] == NUL)
return -1;
}
else if (c == quotechar)
break;
if (has_mbyte)