# HG changeset patch # User Bram Moolenaar # Date 1644953403 -3600 # Node ID 51a28e8be7c3f560972b4eb7e3cb5c9f182175ec # Parent 06f4629cb1538652d230a2ebc608c2de4cdd13c9 patch 8.2.4393: possible number overflow with nested folds Commit: https://github.com/vim/vim/commit/6b43471da4516e8f6c17e5dc2eccbb9d0ba2e0a4 Author: Bram Moolenaar Date: Tue Feb 15 19:15:22 2022 +0000 patch 8.2.4393: possible number overflow with nested folds Problem: Possible number overflow with nested folds. Solution: Avoid a negative line number. diff --git a/src/fold.c b/src/fold.c --- a/src/fold.c +++ b/src/fold.c @@ -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); diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 4393, +/**/ 4392, /**/ 4391,