changeset 25267:c69ebc71bd85 v8.2.3170

patch 8.2.3170: Illegal memory access in test Commit: https://github.com/vim/vim/commit/d8cee76b498507c48706f651aeb78b93b5376d00 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jul 15 23:15:59 2021 +0200 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.
author Bram Moolenaar <Bram@vim.org>
date Thu, 15 Jul 2021 23:30:04 +0200
parents 535c3b8a9d34
children 60f1712e8bee
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
@@ -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))
--- 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,