Mercurial > vim
changeset 25269:d42ac4880e0f
patch 8.2.3171: another illegal memory access in test
Commit: https://github.com/vim/vim/commit/f5f1b59d3b98f1a00180cbaf0a12115fb58b573a
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jul 15 23:44:54 2021 +0200
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 15 Jul 2021 23:45:03 +0200 |
parents | 60f1712e8bee |
children | a3c07227ffde |
files | src/userfunc.c src/version.c |
diffstat | 2 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)