patch 7.4.719 Problem: Overflow when adding MAXCOL to a pointer. Solution: Subtract pointers instead. (James McCoy)

This commit is contained in:
Bram Moolenaar
2015-05-04 16:10:45 +02:00
committed by Douglas Drumond
parent d1771fe793
commit fa09f6a1ba
2 changed files with 3 additions and 1 deletions
+1 -1
View 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)
+2
View File
@@ -756,6 +756,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
719,
/**/
718,
/**/