Patch 8.0.0248
Problem:    vim_strcat() cannot handle overlapping arguments.
Solution:   Use mch_memmove() instead of strcpy(). (Justin M Keyes,
            closes #1415)
Files:      src/misc2.c


*** ../vim-8.0.0247/src/misc2.c 2017-01-26 22:51:51.997875762 +0100
--- src/misc2.c 2017-01-27 21:51:16.059159881 +0100
***************
*** 1719,1725 ****
  
  /*
   * Like strcat(), but make sure the result fits in "tosize" bytes and is
!  * always NUL terminated.
   */
      void
  vim_strcat(char_u *to, char_u *from, size_t tosize)
--- 1719,1725 ----
  
  /*
   * Like strcat(), but make sure the result fits in "tosize" bytes and is
!  * always NUL terminated. "from" and "to" may overlap.
   */
      void
  vim_strcat(char_u *to, char_u *from, size_t tosize)
***************
*** 1733,1739 ****
        to[tosize - 1] = NUL;
      }
      else
!       STRCPY(to + tolen, from);
  }
  
  /*
--- 1733,1739 ----
        to[tosize - 1] = NUL;
      }
      else
!       mch_memmove(to + tolen, from, fromlen + 1);
  }
  
  /*
*** ../vim-8.0.0247/src/version.c       2017-01-27 21:48:46.960162956 +0100
--- src/version.c       2017-01-27 21:52:25.134695318 +0100
***************
*** 766,767 ****
--- 766,769 ----
  {   /* Add new patch number below this line */
+ /**/
+     248,
  /**/

-- 
ARTHUR:        I command you as King of the Britons to stand aside!
BLACK KNIGHT:  I move for no man.
                                  The Quest for the Holy Grail (Monty Python)

 /// 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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui