| To: vim_dev@googlegroups.com |
| Subject: Patch 7.3.675 |
| 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.3.675 |
| Problem: Using uninitialized memory with very long file name. |
| Solution: Put NUL after text when it is truncated. (ZyX) |
| Files: src/buffer.c |
| |
| |
| |
| |
| |
| *** 3058,3064 **** |
| |
| *p++ = '"'; |
| if (buf_spname(curbuf) != NULL) |
| ! STRCPY(p, buf_spname(curbuf)); |
| else |
| { |
| if (!fullname && curbuf->b_fname != NULL) |
| --- 3058,3064 ---- |
| |
| *p++ = '"'; |
| if (buf_spname(curbuf) != NULL) |
| ! vim_strncpy(p, buf_spname(curbuf), IOSIZE - (p - buffer) - 1); |
| else |
| { |
| if (!fullname && curbuf->b_fname != NULL) |
| |
| |
| |
| *** 721,722 **** |
| --- 721,724 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 675, |
| /**/ |
| |
| -- |
| It is illegal to rob a bank and then shoot at the bank teller with a water |
| pistol. |
| [real standing law in Louisana, United States of America] |
| |
| /// 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 /// |