commit | d8cee76b498507c48706f651aeb78b93b5376d00 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Thu Jul 15 23:15:59 2021 +0200 |
committer | Bram Moolenaar <Bram@vim.org> | Thu Jul 15 23:15:59 2021 +0200 |
tree | bf0468351e6c9c2d4a9c4abc5dcdcf988f75c88a | |
parent | 5245beb37cb52991a745644c20d7ca1b0138ef2c [diff] [blame] |
patch 8.2.3170: Illegal memory access in test Problem: Illegal memory access in test. Solution: Check pointer is not before the start of the line.
diff --git a/src/userfunc.c b/src/userfunc.c index e21f15c..d8c943b 100644 --- a/src/userfunc.c +++ b/src/userfunc.c
@@ -870,7 +870,7 @@ 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))