summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-07-15 23:15:59 +0200
committerBram Moolenaar <Bram@vim.org>2021-07-15 23:15:59 +0200
commitd8cee76b498507c48706f651aeb78b93b5376d00 (patch)
treebf0468351e6c9c2d4a9c4abc5dcdcf988f75c88a
parent5245beb37cb52991a745644c20d7ca1b0138ef2c (diff)
patch 8.2.3170: Illegal memory access in testv8.2.3170
Problem: Illegal memory access in test. Solution: Check pointer is not before the start of the line.
-rw-r--r--src/userfunc.c2
-rw-r--r--src/version.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/userfunc.c b/src/userfunc.c
index e21f15c142..d8c943b23d 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -870,7 +870,7 @@ get_function_body(
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))
diff --git a/src/version.c b/src/version.c
index f436e54904..5b3a97b439 100644
--- a/src/version.c
+++ b/src/version.c
@@ -756,6 +756,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 3170,
+/**/
3169,
/**/
3168,