Patch 7.3.675
Problem:    Using uninitialized memory with very long file name.
Solution:   Put NUL after text when it is truncated. (ZyX)
Files:      src/buffer.c


*** ../vim-7.3.674/src/buffer.c 2012-09-05 13:30:22.000000000 +0200
--- src/buffer.c        2012-10-03 16:25:12.000000000 +0200
***************
*** 3058,3064 ****
  
      *p++ = '"';
      if (buf_spname(curbuf) != NULL)
!       STRCPY(p, buf_spname(curbuf));
      else
      {
        if (!fullname && curbuf->b_fname != NULL)
--- 3058,3064 ----
  
      *p++ = '"';
      if (buf_spname(curbuf) != NULL)
!       vim_strncpy(p, buf_spname(curbuf), IOSIZE - (p - buffer) - 1);
      else
      {
        if (!fullname && curbuf->b_fname != NULL)
*** ../vim-7.3.674/src/version.c        2012-10-03 14:48:03.000000000 +0200
--- src/version.c       2012-10-03 16:29:28.000000000 +0200
***************
*** 721,722 ****
--- 721,724 ----
  {   /* Add new patch number below this line */
+ /**/
+     675,
  /**/

-- 
It is illegal to rob a bank and then shoot at the bank teller with a water
pistol.
                [real standing law in Louisana, United States of America]

 /// Bram Moolenaar -- [email protected] -- 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    ///

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui