mirror of
https://github.com/osmarks/ngircd.git
synced 2024-12-13 02:10:27 +00:00
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()
This commit is contained in:
parent
d38d153f51
commit
8d8201502f
@ -893,7 +893,8 @@ IRC_WHO_Channel(CLIENT *Client, CHANNEL *Chan, bool OnlyOps)
|
||||
|
||||
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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user