mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.4393: possible number overflow with nested folds
Problem: Possible number overflow with nested folds. Solution: Avoid a negative line number.
This commit is contained in:
@@ -1604,7 +1604,7 @@ foldMarkAdjustRecurse(
|
||||
if (amount == MAXLNUM)
|
||||
{
|
||||
foldMarkAdjustRecurse(&fp->fd_nested,
|
||||
line1 - fp->fd_top,
|
||||
0,
|
||||
line2 - fp->fd_top,
|
||||
amount,
|
||||
amount_after + (fp->fd_top - top));
|
||||
@@ -1614,7 +1614,7 @@ foldMarkAdjustRecurse(
|
||||
else
|
||||
{
|
||||
foldMarkAdjustRecurse(&fp->fd_nested,
|
||||
line1 - fp->fd_top,
|
||||
0,
|
||||
line2 - fp->fd_top,
|
||||
amount,
|
||||
amount_after - amount);
|
||||
|
@@ -750,6 +750,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
4393,
|
||||
/**/
|
||||
4392,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user