mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
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.
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user