Blame SOURCES/7.4.465

d6ba96
To: vim_dev@googlegroups.com
d6ba96
Subject: Patch 7.4.465
d6ba96
Fcc: outbox
d6ba96
From: Bram Moolenaar <Bram@moolenaar.net>
d6ba96
Mime-Version: 1.0
d6ba96
Content-Type: text/plain; charset=UTF-8
d6ba96
Content-Transfer-Encoding: 8bit
d6ba96
------------
d6ba96
d6ba96
Patch 7.4.465 (after 7.4.016)
d6ba96
Problem:    Crash when expanding a very long string.
d6ba96
Solution:   Use wsncpy() instead of wcscpy(). (Ken Takata)
d6ba96
Files:	    src/os_win32.c
d6ba96
d6ba96
d6ba96
*** ../vim-7.4.464/src/os_win32.c	2014-09-23 21:53:35.310849352 +0200
d6ba96
--- src/os_win32.c	2014-10-06 18:37:27.437277105 +0200
d6ba96
***************
d6ba96
*** 2775,2783 ****
d6ba96
  	if (p != NULL)
d6ba96
  	{
d6ba96
  	    char_u	*q;
d6ba96
! 	    WCHAR	buf[_MAX_PATH + 2];
d6ba96
  
d6ba96
! 	    wcscpy(buf, p);
d6ba96
  	    vim_free(p);
d6ba96
  
d6ba96
  	    if (fname_casew(buf, (len > 0) ? _MAX_PATH : 0) == OK)
d6ba96
--- 2775,2784 ----
d6ba96
  	if (p != NULL)
d6ba96
  	{
d6ba96
  	    char_u	*q;
d6ba96
! 	    WCHAR	buf[_MAX_PATH + 1];
d6ba96
  
d6ba96
! 	    wcsncpy(buf, p, _MAX_PATH);
d6ba96
! 	    buf[_MAX_PATH] = L'\0';
d6ba96
  	    vim_free(p);
d6ba96
  
d6ba96
  	    if (fname_casew(buf, (len > 0) ? _MAX_PATH : 0) == OK)
d6ba96
*** ../vim-7.4.464/src/version.c	2014-10-06 18:10:04.521273516 +0200
d6ba96
--- src/version.c	2014-10-06 18:40:47.361277541 +0200
d6ba96
***************
d6ba96
*** 743,744 ****
d6ba96
--- 743,746 ----
d6ba96
  {   /* Add new patch number below this line */
d6ba96
+ /**/
d6ba96
+     465,
d6ba96
  /**/
d6ba96
d6ba96
-- 
d6ba96
Get a life?  What is the URL where it can be downloaded?
d6ba96
d6ba96
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
d6ba96
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
d6ba96
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
d6ba96
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///