Patch 8.2.3171

4 views
Skip to first unread message

Bram Moolenaar

unread,
Jul 15, 2021, 5:45:29 PM7/15/21
to vim...@googlegroups.com

Patch 8.2.3171
Problem: Another illegal memory access in test.
Solution: Check pointer is after the start of the line.
Files: src/userfunc.c


*** ../vim-8.2.3170/src/userfunc.c 2021-07-15 23:15:55.810448802 +0200
--- src/userfunc.c 2021-07-15 23:43:04.564794332 +0200
***************
*** 875,881 ****
--end;
while (end > p && VIM_ISWHITE(*end))
--end;
! if (end > p - 2 && end[-1] == '=' && end[0] == '>')
{
// found trailing "=> {", start of an inline function
if (nesting == MAX_FUNC_NESTING - 1)
--- 875,881 ----
--end;
while (end > p && VIM_ISWHITE(*end))
--end;
! if (end > p + 2 && end[-1] == '=' && end[0] == '>')
{
// found trailing "=> {", start of an inline function
if (nesting == MAX_FUNC_NESTING - 1)
*** ../vim-8.2.3170/src/version.c 2021-07-15 23:15:55.810448802 +0200
--- src/version.c 2021-07-15 23:43:36.164758149 +0200
***************
*** 757,758 ****
--- 757,760 ----
{ /* Add new patch number below this line */
+ /**/
+ 3171,
/**/

--
hundred-and-one symptoms of being an internet addict:
159. You get excited whenever discussing your hard drive.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages