changeset 3968:e2d36f345a7f v7.3.739

updated for version 7.3.739 Problem: Computing number of lines may have an integer overflow. Solution: Check for MAXCOL explicitly. (Dominique Pelle)
author Bram Moolenaar <bram@vim.org>
date Wed, 28 Nov 2012 18:22:11 +0100
parents fdb8a9c7bd91
children aca1563d5b36
files src/move.c src/version.c
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/move.c
+++ b/src/move.c
@@ -2576,7 +2576,7 @@ get_scroll_overlap(lp, dir)
     else
 	topline_back(lp);
     h2 = lp->height;
-    if (h2 + h1 > min_height)
+    if (h2 == MAXCOL || h2 + h1 > min_height)
     {
 	*lp = loff0;	/* no overlap */
 	return;
@@ -2588,7 +2588,7 @@ get_scroll_overlap(lp, dir)
     else
 	topline_back(lp);
     h3 = lp->height;
-    if (h3 + h2 > min_height)
+    if (h3 == MAXCOL || h3 + h2 > min_height)
     {
 	*lp = loff0;	/* no overlap */
 	return;
@@ -2600,7 +2600,7 @@ get_scroll_overlap(lp, dir)
     else
 	topline_back(lp);
     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 */
     else
 	*lp = loff2;	/* 2 lines overlap */
--- a/src/version.c
+++ b/src/version.c
@@ -726,6 +726,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    739,
+/**/
     738,
 /**/
     737,