Skip to content

Commit f5f1b59

Browse files
committed
patch 8.2.3171: another illegal memory access in test
Problem: Another illegal memory access in test. Solution: Check pointer is after the start of the line.
1 parent d8cee76 commit f5f1b59

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/userfunc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ get_function_body(
875875
--end;
876876
while (end > p && VIM_ISWHITE(*end))
877877
--end;
878-
if (end > p - 2 && end[-1] == '=' && end[0] == '>')
878+
if (end > p + 2 && end[-1] == '=' && end[0] == '>')
879879
{
880880
// found trailing "=> {", start of an inline function
881881
if (nesting == MAX_FUNC_NESTING - 1)

src/version.c

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

756756
static int included_patches[] =
757757
{ /* Add new patch number below this line */
758+
/**/
759+
3171,
758760
/**/
759761
3170,
760762
/**/

0 commit comments

Comments
 (0)