Module: ngircd.git Branch: master Commit: d11a700589b2abab71b67ffb81f17f38936a169c URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=d11a7...
Author: Alexander Barton alex@barton.de Date: Sun Nov 11 16:46:57 2012 +0100
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
---
src/ngircd/irc-info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ngircd/irc-info.c b/src/ngircd/irc-info.c index 54f8317..40d4635 100644 --- a/src/ngircd/irc-info.c +++ b/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));
ngircd-commits@lists.barton.de