Skip to content

Commit

Permalink
patch 8.2.3171: another illegal memory access in test
Browse files Browse the repository at this point in the history
Problem:    Another illegal memory access in test.
Solution:   Check pointer is after the start of the line.
  • Loading branch information
brammool committed Jul 15, 2021
1 parent d8cee76 commit f5f1b59
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/userfunc.c
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ get_function_body(
--end;
while (end > p && VIM_ISWHITE(*end))
--end;
if (end > p - 2 && end[-1] == '=' && end[0] == '>')
if (end > p + 2 && end[-1] == '=' && end[0] == '>')
{
// found trailing "=> {", start of an inline function
if (nesting == MAX_FUNC_NESTING - 1)
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
3171,
/**/
3170,
/**/
Expand Down

0 comments on commit f5f1b59

Please sign in to comment.