To: vim_dev@googlegroups.com
Subject: Patch 7.3.739
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.3.739
Problem: Computing number of lines may have an integer overflow.
Solution: Check for MAXCOL explicitly. (Dominique Pelle)
Files: src/move.c
*** ../vim-7.3.738/src/move.c 2012-03-28 14:19:46.000000000 +0200
--- src/move.c 2012-11-28 18:15:42.000000000 +0100
***************
*** 2576,2582 ****
else
topline_back(lp);
h2 = lp->height;
! if (h2 + h1 > min_height)
{
*lp = loff0; /* no overlap */
return;
--- 2576,2582 ----
else
topline_back(lp);
h2 = lp->height;
! if (h2 == MAXCOL || h2 + h1 > min_height)
{
*lp = loff0; /* no overlap */
return;
***************
*** 2588,2594 ****
else
topline_back(lp);
h3 = lp->height;
! if (h3 + h2 > min_height)
{
*lp = loff0; /* no overlap */
return;
--- 2588,2594 ----
else
topline_back(lp);
h3 = lp->height;
! if (h3 == MAXCOL || h3 + h2 > min_height)
{
*lp = loff0; /* no overlap */
return;
***************
*** 2600,2606 ****
else
topline_back(lp);
h4 = lp->height;
! if (h4 + h3 + h2 > min_height || h3 + h2 + h1 > min_height)
*lp = loff1; /* 1 line overlap */
else
*lp = loff2; /* 2 lines overlap */
--- 2600,2606 ----
else
topline_back(lp);
h4 = lp->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 */
*** ../vim-7.3.738/src/version.c 2012-11-28 17:41:55.000000000 +0100
--- src/version.c 2012-11-28 18:16:40.000000000 +0100
***************
*** 727,728 ****
--- 727,730 ----
{ /* Add new patch number below this line */
+ /**/
+ 739,
/**/
--
From "know your smileys":
!-| I-am-a-Cylon-Centurian-with-one-red-eye-bouncing-back-and-forth
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///