Skip to content

Commit

Permalink
patch 8.2.3170: Illegal memory access in test
Browse files Browse the repository at this point in the history
Problem:    Illegal memory access in test.
Solution:   Check pointer is not before the start of the line.
  • Loading branch information
brammool committed Jul 15, 2021
1 parent 5245beb commit d8cee76
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 @@ -870,7 +870,7 @@ get_function_body(
end = p + STRLEN(p) - 1;
while (end > p && VIM_ISWHITE(*end))
--end;
if (*end == '{')
if (end > p && *end == '{')
{
--end;
while (end > p && VIM_ISWHITE(*end))
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 */
/**/
3170,
/**/
3169,
/**/
Expand Down

0 comments on commit d8cee76

Please sign in to comment.