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
index e21f15c..d8c943b 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -870,7 +870,7 @@
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 f436e54..5b3a97b 100644
--- a/src/version.c
+++ b/src/version.c
@@ -756,6 +756,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 3170,
+/**/
3169,
/**/
3168,