Skip to content

Commit

Permalink
patch 7.4.1680
Browse files Browse the repository at this point in the history
Problem:    Coverity warns for not checking name length (false positive).
Solution:   Only copy the characters we know are there.
  • Loading branch information
brammool committed Mar 28, 2016
1 parent 7d2a579 commit 925ccfd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -2284,11 +2284,11 @@ channel_status(channel_T *channel)
channel_part_info(channel_T *channel, dict_T *dict, char *name, int part)
{
chanpart_T *chanpart = &channel->ch_part[part];
char namebuf[20];
char namebuf[20]; /* longest is "sock_timeout" */
size_t tail;
char *s = "";

STRCPY(namebuf, name);
vim_strncpy((char_u *)namebuf, (char_u *)name, 4);
STRCAT(namebuf, "_");
tail = STRLEN(namebuf);

Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1680,
/**/
1679,
/**/
Expand Down

0 comments on commit 925ccfd

Please sign in to comment.