diff --git a/include/blacklist.h b/include/blacklist.h index 652f12b40..7c8fc23ee 100644 --- a/include/blacklist.h +++ b/include/blacklist.h @@ -36,7 +36,7 @@ struct Blacklist { int ipv6; /* Does this blacklist support IPv6 lookups? */ char host[IRCD_RES_HOSTLEN + 1]; rb_dlink_list filters; /* Filters for queries */ - char reject_reason[IRCD_BUFSIZE]; + char reject_reason[BUFSIZE]; unsigned int hits; time_t lastwarning; }; diff --git a/include/common.h b/include/common.h index 676b6b9cf..58b52ac45 100644 --- a/include/common.h +++ b/include/common.h @@ -30,9 +30,6 @@ #define IRCD_MAX(a, b) ((a) > (b) ? (a) : (b)) #define IRCD_MIN(a, b) ((a) < (b) ? (a) : (b)) -/* Right out of the RFC */ -#define IRCD_BUFSIZE 512 - /* readbuf size */ #define READBUF_SIZE 16384 diff --git a/include/s_conf.h b/include/s_conf.h index 49a0d1e85..b4bd821c2 100644 --- a/include/s_conf.h +++ b/include/s_conf.h @@ -389,7 +389,7 @@ extern int yylex(void); extern unsigned long cidr_to_bitmask[]; -extern char conffilebuf[IRCD_BUFSIZE + 1]; +extern char conffilebuf[BUFSIZE + 1]; extern int lineno; #define NOT_AUTHORISED (-1) diff --git a/ircd/blacklist.c b/ircd/blacklist.c index ae3f10ee0..47438438f 100644 --- a/ircd/blacklist.c +++ b/ircd/blacklist.c @@ -227,7 +227,7 @@ struct Blacklist *new_blacklist(char *name, char *reject_reason, int ipv4, int i blptr->status &= ~CONF_ILLEGAL; rb_strlcpy(blptr->host, name, IRCD_RES_HOSTLEN + 1); - rb_strlcpy(blptr->reject_reason, reject_reason, IRCD_BUFSIZE); + rb_strlcpy(blptr->reject_reason, reject_reason, BUFSIZE); blptr->ipv4 = ipv4; blptr->ipv6 = ipv6; diff --git a/ircd/newconf.c b/ircd/newconf.c index 974f798b5..827f6ed90 100644 --- a/ircd/newconf.c +++ b/ircd/newconf.c @@ -2030,10 +2030,10 @@ void conf_report_error(const char *fmt, ...) { va_list ap; - char msg[IRCD_BUFSIZE + 1] = { 0 }; + char msg[BUFSIZE + 1] = { 0 }; va_start(ap, fmt); - vsnprintf(msg, IRCD_BUFSIZE, fmt, ap); + vsnprintf(msg, BUFSIZE, fmt, ap); va_end(ap); if (testing_conf) @@ -2050,10 +2050,10 @@ void conf_report_warning(const char *fmt, ...) { va_list ap; - char msg[IRCD_BUFSIZE + 1] = { 0 }; + char msg[BUFSIZE + 1] = { 0 }; va_start(ap, fmt); - vsnprintf(msg, IRCD_BUFSIZE, fmt, ap); + vsnprintf(msg, BUFSIZE, fmt, ap); va_end(ap); if (testing_conf) diff --git a/ircd/s_user.c b/ircd/s_user.c index 46a1ee61c..1f6a4cb40 100644 --- a/ircd/s_user.c +++ b/ircd/s_user.c @@ -219,7 +219,7 @@ register_local_user(struct Client *client_p, struct Client *source_p) { struct ConfItem *aconf, *xconf; struct User *user = source_p->user; - char tmpstr2[IRCD_BUFSIZE]; + char tmpstr2[BUFSIZE]; char ipaddr[HOSTIPLEN]; char myusername[USERLEN+1]; int status; diff --git a/ircd/send.c b/ircd/send.c index a733f0497..44cb04984 100644 --- a/ircd/send.c +++ b/ircd/send.c @@ -218,7 +218,7 @@ send_queued_write(rb_fde_t *F, void *data) static void linebuf_put_msgvbuf(struct MsgBuf *msgbuf, buf_head_t *linebuf, unsigned int capmask, const char *pattern, va_list *va) { - char buf[IRCD_BUFSIZE]; + char buf[BUFSIZE]; rb_linebuf_newbuf(linebuf); msgbuf_unparse_prefix(buf, sizeof buf, msgbuf, capmask); @@ -497,7 +497,7 @@ void sendto_channel_flags(struct Client *one, int type, struct Client *source_p, struct Channel *chptr, const char *pattern, ...) { - char buf[IRCD_BUFSIZE]; + char buf[BUFSIZE]; va_list args; buf_head_t rb_linebuf_local; buf_head_t rb_linebuf_id; diff --git a/modules/cap_server_time.c b/modules/cap_server_time.c index 3119319f9..73fce0170 100644 --- a/modules/cap_server_time.c +++ b/modules/cap_server_time.c @@ -52,7 +52,7 @@ mapi_cap_list_av2 cap_server_time_cap_list[] = { static void cap_server_time_process(hook_data *data) { - static char buf[IRCD_BUFSIZE]; + static char buf[BUFSIZE]; time_t ts = rb_current_time(); struct MsgBuf *msgbuf = data->arg1;