Karsten Hopp 6a9511
To: vim_dev@googlegroups.com
Karsten Hopp 6a9511
Subject: Patch 7.3.1298
Karsten Hopp 6a9511
Fcc: outbox
Karsten Hopp 6a9511
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 6a9511
Mime-Version: 1.0
Karsten Hopp 6a9511
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 6a9511
Content-Transfer-Encoding: 8bit
Karsten Hopp 6a9511
------------
Karsten Hopp 6a9511
Karsten Hopp 6a9511
Patch 7.3.1298 (after 7.3.1297)
Karsten Hopp 6a9511
Problem:    Crash.
Karsten Hopp 6a9511
Solution:   Use STRCPY() instead of STRCAT() and allocate one more byte.
Karsten Hopp 6a9511
Files:	    src/misc2.c
Karsten Hopp 6a9511
Karsten Hopp 6a9511
Karsten Hopp 6a9511
*** ../vim-7.3.1297/src/misc2.c	2013-07-03 17:13:56.000000000 +0200
Karsten Hopp 6a9511
--- src/misc2.c	2013-07-03 17:43:11.000000000 +0200
Karsten Hopp 6a9511
***************
Karsten Hopp 6a9511
*** 4680,4690 ****
Karsten Hopp 6a9511
      STRCPY(ff_expand_buffer, search_ctx->ffsc_start_dir);
Karsten Hopp 6a9511
      add_pathsep(ff_expand_buffer);
Karsten Hopp 6a9511
      {
Karsten Hopp 6a9511
! 	char_u *buf = alloc(STRLEN(ff_expand_buffer)
Karsten Hopp 6a9511
! 					 + STRLEN(search_ctx->ffsc_fix_path));
Karsten Hopp 6a9511
  
Karsten Hopp 6a9511
  	STRCPY(buf, ff_expand_buffer);
Karsten Hopp 6a9511
! 	STRCAT(buf, search_ctx->ffsc_fix_path);
Karsten Hopp 6a9511
  	if (mch_isdir(buf))
Karsten Hopp 6a9511
  	{
Karsten Hopp 6a9511
  	    STRCAT(ff_expand_buffer, search_ctx->ffsc_fix_path);
Karsten Hopp 6a9511
--- 4680,4690 ----
Karsten Hopp 6a9511
      STRCPY(ff_expand_buffer, search_ctx->ffsc_start_dir);
Karsten Hopp 6a9511
      add_pathsep(ff_expand_buffer);
Karsten Hopp 6a9511
      {
Karsten Hopp 6a9511
! 	int    eb_len = STRLEN(ff_expand_buffer);
Karsten Hopp 6a9511
! 	char_u *buf = alloc(eb_len + STRLEN(search_ctx->ffsc_fix_path) + 1);
Karsten Hopp 6a9511
  
Karsten Hopp 6a9511
  	STRCPY(buf, ff_expand_buffer);
Karsten Hopp 6a9511
! 	STRCPY(buf + eb_len, search_ctx->ffsc_fix_path);
Karsten Hopp 6a9511
  	if (mch_isdir(buf))
Karsten Hopp 6a9511
  	{
Karsten Hopp 6a9511
  	    STRCAT(ff_expand_buffer, search_ctx->ffsc_fix_path);
Karsten Hopp 6a9511
*** ../vim-7.3.1297/src/version.c	2013-07-03 17:13:56.000000000 +0200
Karsten Hopp 6a9511
--- src/version.c	2013-07-03 17:44:17.000000000 +0200
Karsten Hopp 6a9511
***************
Karsten Hopp 6a9511
*** 730,731 ****
Karsten Hopp 6a9511
--- 730,733 ----
Karsten Hopp 6a9511
  {   /* Add new patch number below this line */
Karsten Hopp 6a9511
+ /**/
Karsten Hopp 6a9511
+     1298,
Karsten Hopp 6a9511
  /**/
Karsten Hopp 6a9511
Karsten Hopp 6a9511
-- 
Karsten Hopp 6a9511
TALL KNIGHT:   Firstly.  You must get us another shrubbery!
Karsten Hopp 6a9511
OTHER KNIGHTS: More shrubberies!  More shrubberies for the ex-Knights of Ni!
Karsten Hopp 6a9511
ARTHUR:        Not another shrubbery -
Karsten Hopp 6a9511
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
Karsten Hopp 6a9511
Karsten Hopp 6a9511
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 6a9511
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 6a9511
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 6a9511
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///