Module: ngircd.git Branch: master Commit: 4c5b439992ce99f1bed84c51e4d9c3a3cd118858 URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=4c5b4...
Author: Alexander Barton alex@barton.de Date: Mon Oct 7 21:56:09 2013 +0200
ngircd.c, main(): use strlcat() instead of strcat()
This fixes the following warning on OpenBSD 5.3:
ngircd.o(.text+0xeb4): In function `main': src/ngircd/ngircd.c:300: warning: strcat() is almost always misused, please use strlcat()
Thanks to Götz Hoffart for reporting this!
---
src/ngircd/ngircd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ngircd/ngircd.c b/src/ngircd/ngircd.c index 5637cb2..9c27409 100644 --- a/src/ngircd/ngircd.c +++ b/src/ngircd/ngircd.c @@ -297,7 +297,7 @@ main(int argc, const char *argv[]) PROTOVER, PROTOIRCPLUS, PACKAGE_NAME, PACKAGE_VERSION, IRCPLUSFLAGS); #ifdef ZLIB - strcat(NGIRCd_ProtoID, "Z"); + strlcat(NGIRCd_ProtoID, "Z", sizeof NGIRCd_ProtoID); #endif if (Conf_OperCanMode) strcat(NGIRCd_ProtoID, "o");