Patch 8.2.4393
Problem: Possible number overflow with nested folds.
Solution: Avoid a negative line number.
Files: src/fold.c
*** ../vim-8.2.4392/src/fold.c 2022-01-28 15:28:00.208927722 +0000
--- src/fold.c 2022-02-15 19:01:21.348589264 +0000
***************
*** 1604,1610 ****
if (amount == MAXLNUM)
{
foldMarkAdjustRecurse(&fp->fd_nested,
! line1 - fp->fd_top,
line2 - fp->fd_top,
amount,
amount_after + (fp->fd_top - top));
--- 1604,1610 ----
if (amount == MAXLNUM)
{
foldMarkAdjustRecurse(&fp->fd_nested,
! 0,
line2 - fp->fd_top,
amount,
amount_after + (fp->fd_top - top));
***************
*** 1614,1620 ****
else
{
foldMarkAdjustRecurse(&fp->fd_nested,
! line1 - fp->fd_top,
line2 - fp->fd_top,
amount,
amount_after - amount);
--- 1614,1620 ----
else
{
foldMarkAdjustRecurse(&fp->fd_nested,
! 0,
line2 - fp->fd_top,
amount,
amount_after - amount);
*** ../vim-8.2.4392/src/version.c 2022-02-15 17:17:13.789550341 +0000
--- src/version.c 2022-02-15 19:15:08.102837390 +0000
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 4393,
/**/
--
hundred-and-one symptoms of being an internet addict:
46. Your wife makes a new rule: "The computer cannot come to bed."
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20220215195135.2D6D81C0310%40moolenaar.net.