Commits

Bram Moolenaar  committed e2d36f3

updated for version 7.3.739
Problem: Computing number of lines may have an integer overflow.
Solution: Check for MAXCOL explicitly. (Dominique Pelle)

  • Participants
  • Parent commits fdb8a9c
  • Tags v7-3-739

Comments (0)

Files changed (2)

     else
 	topline_back(lp);
     h2 = lp->height;
-    if (h2 + h1 > min_height)
+    if (h2 == MAXCOL || h2 + h1 > min_height)
     {
 	*lp = loff0;	/* no overlap */
 	return;
     else
 	topline_back(lp);
     h3 = lp->height;
-    if (h3 + h2 > min_height)
+    if (h3 == MAXCOL || h3 + h2 > min_height)
     {
 	*lp = loff0;	/* no overlap */
 	return;
     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 */

File src/version.c

 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    739,
+/**/
     738,
 /**/
     737,