diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-08-04 21:46:18 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-08-04 21:46:18 +0200 |
commit | 282f9c64e570e832d3eba12950da15c9f1a40f06 (patch) | |
tree | 2b5a2fe526c67da543ba32859f54808e546cb2f4 | |
parent | e46a2ed0d8471b93a8b9edd98280d5de4a02c623 (diff) |
patch 8.2.1364: invalid memory access when searching for raw stringv8.2.1364
Problem: Invalid memory access when searching for raw string.
Solution: Check for delimiter match before following quote. (closes #6578)
-rw-r--r-- | src/search.c | 4 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/search.c b/src/search.c index 91a26dd36a..7391ab0fbf 100644 --- a/src/search.c +++ b/src/search.c @@ -1928,8 +1928,8 @@ 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; diff --git a/src/version.c b/src/version.c index 376c8fd641..366d3ab777 100644 --- a/src/version.c +++ b/src/version.c @@ -755,6 +755,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1364, +/**/ 1363, /**/ 1362, |