InterNetNews / inn

INN (InterNetNews) Usenet server
https://www.isc.org/othersoftware/#INN
Other
68 stars 12 forks source link

Use snprintf, strlcat and strlcpy instead of sprintf, strcat and strcpy #300

Open Julien-Elie opened 5 months ago

Julien-Elie commented 5 months ago

These warnings would be worthwhile fixing. They're emitted during a build on OpenBSD:

art.c:1039(art.o:(ARTpost)): warning: sprintf() is often misused, please use snprintf()
nnrpd.c:1442(nnrpd.o:(main)): warning: sprintf() is often misused, please use snprintf()
configfile.y:761(config_y.o:(yyparse)): warning: sprintf() is often misused, please use snprintf()
configfile.y:761(config_y.o:(yyparse)): warning: sprintf() is often misused, please use snprintf()
imap_connection.c:3230(imap_connection.o:(lmtp_readCB)): warning: strcat() is almost always misused, please use strlcat()
expirectl.c:268(expirectl.o:(main)): warning: strcpy() is almost always misused, please use strlcpy()
expirectl.c:262(expirectl.o:(main)): warning: sprintf() is often misused, please use snprintf()
art.c:1039(../innd/art.o:(ARTpost)): warning: sprintf() is often misused, please use snprintf()
art.c:1039(../innd/art.o:(ARTpost)): warning: sprintf() is often misused, please use snprintf()
inet_ntoa.c:47 (../lib/inet_ntoa.c:47)(lib/inet_ntoa.o:(test_inet_ntoa)): warning: sprintf() is often misused, please use snprintf()
messages-t.c:291 (lib/messages-t.c:291)(lib/messages-t.o:(main)): warning: sprintf() is often misused, please use snprintf()
snprintf-t.c:159 (lib/snprintf-t.c:159)(lib/snprintf-t.o:(main)): warning: sprintf() is often misused, please use snprintf()