summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-05-04 16:10:26 +0200
committerBram Moolenaar <Bram@vim.org>2015-05-04 16:10:26 +0200
commitc4dc286fe67f385043efddca1bb7196619df8fb2 (patch)
tree5149c94de515f57f4fcae88749201ad4c61998b0
parent81278efadf45ad745ec9733fdd9970f070571544 (diff)
downloadvim-git-c4dc286fe67f385043efddca1bb7196619df8fb2.tar.gz
patch 7.4.719v7.4.719
Problem: Overflow when adding MAXCOL to a pointer. Solution: Subtract pointers instead. (James McCoy)
-rw-r--r--src/screen.c2
-rw-r--r--src/version.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/screen.c b/src/screen.c
index f9a847dbd..a0e9fc9fb 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -4341,7 +4341,7 @@ win_line(wp, lnum, startrow, endrow, nochange)
|| (mb_utf8 && mb_c == 160)
#endif
) && lcs_nbsp)
- || (c == ' ' && lcs_space && ptr <= line + trailcol)))
+ || (c == ' ' && lcs_space && ptr - line <= trailcol)))
{
c = (c == ' ') ? lcs_space : lcs_nbsp;
if (area_attr == 0 && search_attr == 0)
diff --git a/src/version.c b/src/version.c
index ab9d100af..61bd602fe 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 719,
+/**/
718,
/**/
717,