Commit Diff
- Commit:
8d8201502f79bfe6fdaf8e94a11544332bb9630a
- From:
- Alexander Barton <alex@barton.de>
- Date:
- Message:
- IRC_WHO_Channel(): Use strlcpy() instead of strcpy() This fixes the following warning, at least on OpenBSD 4.8: irc-info.o(.text+0x2427): In function `IRC_WHO': src/ngircd/irc-info.c:896: warning: strcpy() is almost always misused, please use strlcpy()
- Actions:
- Patch | Tree
--- src/ngircd/irc-info.c +++ src/ngircd/irc-info.c @@ -893,7 +893,8 @@ IRC_WHO_Channel(CLIENT *Client, CHANNEL *Chan, bool On is_visible = strchr(client_modes, 'i') == NULL; if (is_member || is_visible) { - strcpy(flags, who_flags_status(client_modes)); + strlcpy(flags, who_flags_status(client_modes), + sizeof(flags)); if (is_ircop) strlcat(flags, "*", sizeof(flags));