commit d11a700589b2abab71b67ffb81f17f38936a169c from: Alexander Barton date: Sun Nov 11 15:46:57 2012 UTC irc-info.c: Use strlcpy() instead of strcpy() This fixes the following warning of gcc (tested on OpenBSD 5.0:) irc-info.c:990: warning: strcpy() is almost always misused, please use strlcpy commit - 0a26079af2f5ee2bf5d0c67d1c701abf77d3cd56 commit + d11a700589b2abab71b67ffb81f17f38936a169c blob - 54f83170e3bceea94828acb1baf83de868a43261 blob + 40d4635494a80f74d97737844a633ea651c87edf --- src/ngircd/irc-info.c +++ src/ngircd/irc-info.c @@ -987,7 +987,7 @@ IRC_WHO_Mask(CLIENT *Client, char *Mask, bool OnlyOps) if (IRC_CheckListTooBig(Client, count, MAX_RPL_WHO, "WHO")) break; - strcpy(flags, who_flags_status(Client_Modes(c))); + strlcpy(flags, who_flags_status(Client_Modes(c)), sizeof(flags)); if (strchr(Client_Modes(c), 'o')) strlcat(flags, "*", sizeof(flags));