| 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 |
| |
| |
| |
| |
| |
| *** 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 */ |
| |
| |
| |
| *** 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 /// |