diff options
author | Bram Moolenaar <Bram@vim.org> | 2012-11-28 18:22:11 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2012-11-28 18:22:11 +0100 |
commit | f4f1956724f70a7def3bcf8a2d77cf1f8c9dd28c (patch) | |
tree | 6a2dc51a36d2aef16ac765fd28d6b9ad17a29f98 | |
parent | 2df58b4a58e376e475a3cc0ccb86d991d65b1b77 (diff) | |
download | vim-f4f1956724f70a7def3bcf8a2d77cf1f8c9dd28c.zip |
updated for version 7.3.739
Problem: Computing number of lines may have an integer overflow.
Solution: Check for MAXCOL explicitly. (Dominique Pelle)
-rw-r--r-- | src/move.c | 6 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/move.c b/src/move.c index 21a74b8ad..5c8257449 100644 --- 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 */ diff --git a/src/version.c b/src/version.c index a6259c626..47a69c28e 100644 --- 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, |