0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

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.
This commit is contained in:
Bram Moolenaar 2021-07-15 23:15:59 +02:00
parent 5245beb37c
commit d8cee76b49
2 changed files with 3 additions and 1 deletions

View File

@ -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))

View File

@ -755,6 +755,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
3170,
/**/
3169,
/**/