| To: vim_dev@googlegroups.com |
| Subject: Patch 7.4.719 |
| 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.4.719 |
| Problem: Overflow when adding MAXCOL to a pointer. |
| Solution: Subtract pointers instead. (James McCoy) |
| Files: src/screen.c |
| |
| |
| |
| |
| |
| *** 4341,4347 **** |
| || (mb_utf8 && mb_c == 160) |
| #endif |
| ) && lcs_nbsp) |
| ! || (c == ' ' && lcs_space && ptr <= line + trailcol))) |
| { |
| c = (c == ' ') ? lcs_space : lcs_nbsp; |
| if (area_attr == 0 && search_attr == 0) |
| --- 4341,4347 ---- |
| || (mb_utf8 && mb_c == 160) |
| #endif |
| ) && lcs_nbsp) |
| ! || (c == ' ' && lcs_space && ptr - line <= trailcol))) |
| { |
| c = (c == ' ') ? lcs_space : lcs_nbsp; |
| if (area_attr == 0 && search_attr == 0) |
| |
| |
| |
| *** 743,744 **** |
| --- 743,746 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 719, |
| /**/ |
| |
| -- |
| For a moment, nothing happened. |
| Then, after a second or so, nothing continued to happen. |
| -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" |
| |
| /// 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 /// |