| To: vim-dev@vim.org |
| Subject: patch 7.1.053 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.1.053 |
| Problem: Accessing uninitialized memory when giving a message. |
| Solution: Check going the length before checking for a NUL byte. |
| Files: src/message.c |
| |
| |
| |
| |
| |
| *** 1842,1848 **** |
| int wrap; |
| |
| did_wait_return = FALSE; |
| ! while (*s != NUL && (maxlen < 0 || (int)(s - str) < maxlen)) |
| { |
| /* |
| * We are at the end of the screen line when: |
| --- 1842,1848 ---- |
| int wrap; |
| |
| did_wait_return = FALSE; |
| ! while ((maxlen < 0 || (int)(s - str) < maxlen) && *s != NUL) |
| { |
| /* |
| * We are at the end of the screen line when: |
| |
| |
| |
| *** 668,669 **** |
| --- 668,671 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 53, |
| /**/ |
| |
| -- |
| From "know your smileys": |
| <>:-) Bishop |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ download, build and distribute -- http://www.A-A-P.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |