]> granicus.if.org Git - vim/commitdiff
patch 7.4.719 v7.4.719
authorBram Moolenaar <Bram@vim.org>
Mon, 4 May 2015 14:10:26 +0000 (16:10 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 4 May 2015 14:10:26 +0000 (16:10 +0200)
Problem:    Overflow when adding MAXCOL to a pointer.
Solution:   Subtract pointers instead. (James McCoy)

src/screen.c
src/version.c

index f9a847dbdec6fbec0c621c786143916d0664f58a..a0e9fc9fb9f1945a3a014b53b032cb31f924629d 100644 (file)
@@ -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)
index ab9d100af95b6001f034da693e6e4d460b4677c9..61bd602fe7275ba27e5c95f7b545c9b9f8db6692 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    719,
 /**/
     718,
 /**/