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