diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-07-15 23:44:54 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-07-15 23:44:54 +0200 |
commit | f5f1b59d3b98f1a00180cbaf0a12115fb58b573a (patch) | |
tree | de59f01c6ffe4357b23bd4818485b1ab8d996551 /src/userfunc.c | |
parent | d8cee76b498507c48706f651aeb78b93b5376d00 (diff) | |
download | vim-git-f5f1b59d3b98f1a00180cbaf0a12115fb58b573a.tar.gz |
patch 8.2.3171: another illegal memory access in testv8.2.3171
Problem: Another illegal memory access in test.
Solution: Check pointer is after the start of the line.
Diffstat (limited to 'src/userfunc.c')
-rw-r--r-- | src/userfunc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/userfunc.c b/src/userfunc.c index d8c943b23..3dfa68097 100644 --- a/src/userfunc.c +++ b/src/userfunc.c @@ -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) |