0
0
mirror of https://github.com/vim/vim.git synced 2025-07-25 10:54:51 -04:00

updated for version 7.3.739

Problem:    Computing number of lines may have an integer overflow.
Solution:   Check for MAXCOL explicitly. (Dominique Pelle)
This commit is contained in:
Bram Moolenaar 2012-11-28 18:22:11 +01:00
parent 2df58b4a58
commit f4f1956724
2 changed files with 5 additions and 3 deletions

View File

@ -2576,7 +2576,7 @@ get_scroll_overlap(lp, dir)
else else
topline_back(lp); topline_back(lp);
h2 = lp->height; h2 = lp->height;
if (h2 + h1 > min_height) if (h2 == MAXCOL || h2 + h1 > min_height)
{ {
*lp = loff0; /* no overlap */ *lp = loff0; /* no overlap */
return; return;
@ -2588,7 +2588,7 @@ get_scroll_overlap(lp, dir)
else else
topline_back(lp); topline_back(lp);
h3 = lp->height; h3 = lp->height;
if (h3 + h2 > min_height) if (h3 == MAXCOL || h3 + h2 > min_height)
{ {
*lp = loff0; /* no overlap */ *lp = loff0; /* no overlap */
return; return;
@ -2600,7 +2600,7 @@ get_scroll_overlap(lp, dir)
else else
topline_back(lp); topline_back(lp);
h4 = lp->height; h4 = lp->height;
if (h4 + h3 + h2 > min_height || h3 + h2 + h1 > min_height) if (h4 == MAXCOL || h4 + h3 + h2 > min_height || h3 + h2 + h1 > min_height)
*lp = loff1; /* 1 line overlap */ *lp = loff1; /* 1 line overlap */
else else
*lp = loff2; /* 2 lines overlap */ *lp = loff2; /* 2 lines overlap */

View File

@ -725,6 +725,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
739,
/**/ /**/
738, 738,
/**/ /**/