# HG changeset patch # User Bram Moolenaar # Date 1626384604 -7200 # Node ID c69ebc71bd85c06a7be02b13d9572d5c72f17e41 # Parent 535c3b8a9d34324c19a23d178932af211648ef9c patch 8.2.3170: Illegal memory access in test Commit: https://github.com/vim/vim/commit/d8cee76b498507c48706f651aeb78b93b5376d00 Author: Bram Moolenaar 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. diff --git a/src/userfunc.c b/src/userfunc.c --- 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 --- 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,