diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2016-06-05 16:33:27 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2016-06-05 17:47:57 +0100 |
commit | a36d730dc2c6e6e68d2a84ec8e1c7cff91e2986b (patch) | |
tree | 36532c5cf9f1056c51f1147e6eb161a5b69da7c0 /contrib/ip_cloaking.c | |
parent | d3f800d23b4fdab512d437611c85eb3288f4f6b5 (diff) |
update contrib modules
Diffstat (limited to 'contrib/ip_cloaking.c')
-rw-r--r-- | contrib/ip_cloaking.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/contrib/ip_cloaking.c b/contrib/ip_cloaking.c index 2b2cf48..b091ae5 100644 --- a/contrib/ip_cloaking.c +++ b/contrib/ip_cloaking.c @@ -65,7 +65,6 @@ #include "modules.h" #include "memory.h" #include "log.h" -#include "sprintf_irc.h" #include "userhost.h" static unsigned int umode_vhost = 0; @@ -272,15 +271,15 @@ make_virthost(char *curr, char *host, char *new) if (strchr("0123456789", parv2[3][len - 1]) || parc2 < 2) { - ircsprintf(mask, "%s.%s.%s.%lx", - parv2[parc2 - 4], parv2[parc2 - 3], - parv2[parc2 - 2], hash[3]); + snprintf(mask, sizeof(mask), "%s.%s.%s.%lx", + parv2[parc2 - 4], parv2[parc2 - 3], + parv2[parc2 - 2], hash[3]); } else { /* isp.tld */ - ircsprintf(mask, "%lx-%lx.%s.%s", - hash[0], hash[3], parv2[parc2 - 2], parv2[parc2 - 1]); + snprintf(mask, sizeof(mask), "%lx-%lx.%s.%s", + hash[0], hash[3], parv2[parc2 - 2], parv2[parc2 - 1]); } } else @@ -288,28 +287,28 @@ make_virthost(char *curr, char *host, char *new) if (parc2 >= 4) { /* isp.sub.tld or district.isp.tld */ - ircsprintf(mask, "%lx-%lx.%s.%s.%s", + snprintf(mask, sizeof(mask), "%lx-%lx.%s.%s.%s", hash[3], hash[1], parv2[parc2 - 3], parv2[parc2 - 2], parv2[parc2 - 1]); } else { /* isp.tld */ - ircsprintf(mask, "%lx-%lx.%s.%s", + snprintf(mask, sizeof(mask), "%lx-%lx.%s.%s", hash[0], hash[3], parv2[parc2 - 2], parv2[parc2 - 1]); } if (parc2 >= 5) { /* zone.district.isp.tld or district.isp.sub.tld */ - ircsprintf(mask, "%lx-%lx.%s.%s.%s.%s", + snprintf(mask, sizeof(mask), "%lx-%lx.%s.%s.%s.%s", hash[1], hash[0], parv2[parc2 - 4], parv2[parc2 - 3], parv2[parc2 - 2], parv2[parc2 - 1]); } else { /* isp.tld */ - ircsprintf(mask, "%lx-%lx.%s.%s", + snprintf(mask, sizeof(mask), "%lx-%lx.%s.%s", hash[0], hash[3], parv2[parc2 - 2], parv2[parc2 - 1]); } } |