Skip to content

Commit 443ca7f

Browse files
committed
updated for version 7.3.739
Problem: Computing number of lines may have an integer overflow. Solution: Check for MAXCOL explicitly. (Dominique Pelle)
1 parent 6886afb commit 443ca7f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/move.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2576,7 +2576,7 @@ get_scroll_overlap(lp, dir)
25762576
else
25772577
topline_back(lp);
25782578
h2 = lp->height;
2579-
if (h2 + h1 > min_height)
2579+
if (h2 == MAXCOL || h2 + h1 > min_height)
25802580
{
25812581
*lp = loff0; /* no overlap */
25822582
return;
@@ -2588,7 +2588,7 @@ get_scroll_overlap(lp, dir)
25882588
else
25892589
topline_back(lp);
25902590
h3 = lp->height;
2591-
if (h3 + h2 > min_height)
2591+
if (h3 == MAXCOL || h3 + h2 > min_height)
25922592
{
25932593
*lp = loff0; /* no overlap */
25942594
return;
@@ -2600,7 +2600,7 @@ get_scroll_overlap(lp, dir)
26002600
else
26012601
topline_back(lp);
26022602
h4 = lp->height;
2603-
if (h4 + h3 + h2 > min_height || h3 + h2 + h1 > min_height)
2603+
if (h4 == MAXCOL || h4 + h3 + h2 > min_height || h3 + h2 + h1 > min_height)
26042604
*lp = loff1; /* 1 line overlap */
26052605
else
26062606
*lp = loff2; /* 2 lines overlap */

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,8 @@ static char *(features[]) =
725725

726726
static int included_patches[] =
727727
{ /* Add new patch number below this line */
728+
/**/
729+
739,
728730
/**/
729731
738,
730732
/**/

0 commit comments

Comments
 (0)