Skip to content

Commit

Permalink
Merge remote-tracking branch 'edward/coverity' into coverity
Browse files Browse the repository at this point in the history
  • Loading branch information
thommey committed Nov 21, 2016
2 parents 41da597 + 9ad8fb6 commit c3f0650
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/mod/channels.mod/channels.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ static void set_mode_protect(struct chanset_t *chan, char *set)
if (pos) {
s1 = newsplit(&set);
if (s1[0])
strcpy(chan->key_prot, s1);
strncpyz(chan->key_prot, s1, sizeof chan->key_prot);
}
break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/mod/console.mod/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ static int console_chon(char *handle, int idx)
if (dcc[idx].type == &DCC_CHAT) {
if (i) {
if (i->channel && i->channel[0])
strcpy(dcc[idx].u.chat->con_chan, i->channel);
strcpy(dcc[idx].u.chat->con_chan, i->channel, sizeof dcc[idx].u.chat->con_chan);
get_user_flagrec(dcc[idx].user, &fr, i->channel);
dcc[idx].u.chat->con_flags = check_conflags(&fr, i->conflags);
dcc[idx].u.chat->strip_flags = i->stripflags;
Expand Down
2 changes: 1 addition & 1 deletion src/mod/irc.mod/msgcmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ static int msg_hello(char *nick, char *h, struct userrec *u, char *p)
if (p1 == NULL)
s1[0] = 0;
else
strcpy(s1, p1);
strncpyz(s1, p1, sizeof s1);
}
}
return 1;
Expand Down

0 comments on commit c3f0650

Please sign in to comment.