commit | 53a70289c2712808e6d4e88927e03cac01b470dd | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Mon May 09 13:15:07 2022 +0100 |
committer | Bram Moolenaar <Bram@vim.org> | Mon May 09 13:15:07 2022 +0100 |
tree | 2f0b1adfd8339a26ed38b85bbabd7cb4383d580b | |
parent | 0519ce00394474055bd58c089ea90a19986443eb [diff] [blame] |
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.
diff --git a/src/textobject.c b/src/textobject.c index e4a7db3..edaa64c 100644 --- a/src/textobject.c +++ b/src/textobject.c
@@ -1664,7 +1664,11 @@ 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)