Karsten Hopp bfd8a1
To: vim_dev@googlegroups.com
Karsten Hopp bfd8a1
Subject: Patch 7.3.675
Karsten Hopp bfd8a1
Fcc: outbox
Karsten Hopp bfd8a1
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp bfd8a1
Mime-Version: 1.0
Karsten Hopp bfd8a1
Content-Type: text/plain; charset=UTF-8
Karsten Hopp bfd8a1
Content-Transfer-Encoding: 8bit
Karsten Hopp bfd8a1
------------
Karsten Hopp bfd8a1
Karsten Hopp bfd8a1
Patch 7.3.675
Karsten Hopp bfd8a1
Problem:    Using uninitialized memory with very long file name.
Karsten Hopp bfd8a1
Solution:   Put NUL after text when it is truncated. (ZyX)
Karsten Hopp bfd8a1
Files:	    src/buffer.c
Karsten Hopp bfd8a1
Karsten Hopp bfd8a1
Karsten Hopp bfd8a1
*** ../vim-7.3.674/src/buffer.c	2012-09-05 13:30:22.000000000 +0200
Karsten Hopp bfd8a1
--- src/buffer.c	2012-10-03 16:25:12.000000000 +0200
Karsten Hopp bfd8a1
***************
Karsten Hopp bfd8a1
*** 3058,3064 ****
Karsten Hopp bfd8a1
  
Karsten Hopp bfd8a1
      *p++ = '"';
Karsten Hopp bfd8a1
      if (buf_spname(curbuf) != NULL)
Karsten Hopp bfd8a1
! 	STRCPY(p, buf_spname(curbuf));
Karsten Hopp bfd8a1
      else
Karsten Hopp bfd8a1
      {
Karsten Hopp bfd8a1
  	if (!fullname && curbuf->b_fname != NULL)
Karsten Hopp bfd8a1
--- 3058,3064 ----
Karsten Hopp bfd8a1
  
Karsten Hopp bfd8a1
      *p++ = '"';
Karsten Hopp bfd8a1
      if (buf_spname(curbuf) != NULL)
Karsten Hopp bfd8a1
! 	vim_strncpy(p, buf_spname(curbuf), IOSIZE - (p - buffer) - 1);
Karsten Hopp bfd8a1
      else
Karsten Hopp bfd8a1
      {
Karsten Hopp bfd8a1
  	if (!fullname && curbuf->b_fname != NULL)
Karsten Hopp bfd8a1
*** ../vim-7.3.674/src/version.c	2012-10-03 14:48:03.000000000 +0200
Karsten Hopp bfd8a1
--- src/version.c	2012-10-03 16:29:28.000000000 +0200
Karsten Hopp bfd8a1
***************
Karsten Hopp bfd8a1
*** 721,722 ****
Karsten Hopp bfd8a1
--- 721,724 ----
Karsten Hopp bfd8a1
  {   /* Add new patch number below this line */
Karsten Hopp bfd8a1
+ /**/
Karsten Hopp bfd8a1
+     675,
Karsten Hopp bfd8a1
  /**/
Karsten Hopp bfd8a1
Karsten Hopp bfd8a1
-- 
Karsten Hopp bfd8a1
It is illegal to rob a bank and then shoot at the bank teller with a water
Karsten Hopp bfd8a1
pistol.
Karsten Hopp bfd8a1
		[real standing law in Louisana, United States of America]
Karsten Hopp bfd8a1
Karsten Hopp bfd8a1
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp bfd8a1
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp bfd8a1
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp bfd8a1
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///