From d8cee76b498507c48706f651aeb78b93b5376d00 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 15 Jul 2021 23:15:59 +0200 Subject: 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. --- src/userfunc.c | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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 @@ -755,6 +755,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 3170, /**/ 3169, /**/ -- cgit v1.2.3