diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-07-15 23:15:59 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-07-15 23:15:59 +0200 |
commit | d8cee76b498507c48706f651aeb78b93b5376d00 (patch) | |
tree | bf0468351e6c9c2d4a9c4abc5dcdcf988f75c88a /src | |
parent | 5245beb37cb52991a745644c20d7ca1b0138ef2c (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.
Diffstat (limited to 'src')
-rw-r--r-- | src/userfunc.c | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
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, |