| To: vim_dev@googlegroups.com |
| Subject: Patch 7.4.465 |
| 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.465 (after 7.4.016) |
| Problem: Crash when expanding a very long string. |
| Solution: Use wsncpy() instead of wcscpy(). (Ken Takata) |
| Files: src/os_win32.c |
| |
| |
| |
| |
| |
| *** 2775,2783 **** |
| if (p != NULL) |
| { |
| char_u *q; |
| ! WCHAR buf[_MAX_PATH + 2]; |
| |
| ! wcscpy(buf, p); |
| vim_free(p); |
| |
| if (fname_casew(buf, (len > 0) ? _MAX_PATH : 0) == OK) |
| --- 2775,2784 ---- |
| if (p != NULL) |
| { |
| char_u *q; |
| ! WCHAR buf[_MAX_PATH + 1]; |
| |
| ! wcsncpy(buf, p, _MAX_PATH); |
| ! buf[_MAX_PATH] = L'\0'; |
| vim_free(p); |
| |
| if (fname_casew(buf, (len > 0) ? _MAX_PATH : 0) == OK) |
| |
| |
| |
| *** 743,744 **** |
| --- 743,746 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 465, |
| /**/ |
| |
| -- |
| Get a life? What is the URL where it can be downloaded? |
| |
| /// 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 /// |