Skip to content

Commit 282f9c6

Browse files
committed
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 #6578)
1 parent e46a2ed commit 282f9c6

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/search.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1928,8 +1928,8 @@ find_rawstring_end(char_u *linep, pos_T *startpos, pos_T *endpos)
19281928
{
19291929
if (lnum == endpos->lnum && (colnr_T)(p - line) >= endpos->col)
19301930
break;
1931-
if (*p == ')' && p[delim_len + 1] == '"'
1932-
&& STRNCMP(delim_copy, p + 1, delim_len) == 0)
1931+
if (*p == ')' && STRNCMP(delim_copy, p + 1, delim_len) == 0
1932+
&& p[delim_len + 1] == '"')
19331933
{
19341934
found = TRUE;
19351935
break;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,8 @@ static char *(features[]) =
754754

755755
static int included_patches[] =
756756
{ /* Add new patch number below this line */
757+
/**/
758+
1364,
757759
/**/
758760
1363,
759761
/**/

0 commit comments

Comments
 (0)