Patch 7.4.1680
Problem:    Coverity warns for not checking name length (false positive).
Solution:   Only copy the characters we know are there.
Files:      src/channel.c


*** ../vim-7.4.1679/src/channel.c       2016-03-28 19:16:15.661846574 +0200
--- src/channel.c       2016-03-28 22:33:50.745627750 +0200
***************
*** 2284,2294 ****
  channel_part_info(channel_T *channel, dict_T *dict, char *name, int part)
  {
      chanpart_T *chanpart = &channel->ch_part[part];
!     char      namebuf[20];
      size_t    tail;
      char      *s = "";
  
!     STRCPY(namebuf, name);
      STRCAT(namebuf, "_");
      tail = STRLEN(namebuf);
  
--- 2284,2294 ----
  channel_part_info(channel_T *channel, dict_T *dict, char *name, int part)
  {
      chanpart_T *chanpart = &channel->ch_part[part];
!     char      namebuf[20];  /* longest is "sock_timeout" */
      size_t    tail;
      char      *s = "";
  
!     vim_strncpy((char_u *)namebuf, (char_u *)name, 4);
      STRCAT(namebuf, "_");
      tail = STRLEN(namebuf);
  
*** ../vim-7.4.1679/src/version.c       2016-03-28 22:30:46.795497938 +0200
--- src/version.c       2016-03-28 22:35:33.752580468 +0200
***************
*** 750,751 ****
--- 750,753 ----
  {   /* Add new patch number below this line */
+ /**/
+     1680,
  /**/

-- 
Send $25.00 for handy leaflet on how to make money by selling leaflets

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