From 354d611659dee2b7fda6576920529f1df5bff617 Mon Sep 17 00:00:00 2001 From: michael Date: Tue, 17 Dec 2013 17:41:53 +0000 Subject: - introduce_client(), sendnick_TS(): fixed buffer overflow if a client has all possible modes set that are defined in SEND_UMODES git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@2687 82007160-df01-0410-b94d-b575c5fd34c7 --- src/s_serv.c | 2 +- src/s_user.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/s_serv.c b/src/s_serv.c index 7c6fa2e..97ee59b 100644 --- a/src/s_serv.c +++ b/src/s_serv.c @@ -570,7 +570,7 @@ send_capabilities(struct Client *client_p, int cap_can_send) void sendnick_TS(struct Client *client_p, struct Client *target_p) { - static char ubuf[12]; + char ubuf[66]; if (!IsClient(target_p)) return; diff --git a/src/s_user.c b/src/s_user.c index 30d54f9..7da24f8 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -563,7 +563,7 @@ static void introduce_client(struct Client *source_p) { dlink_node *server_node = NULL; - static char ubuf[12]; + char ubuf[66]; if (MyClient(source_p)) send_umode(source_p, source_p, 0, SEND_UMODES, ubuf); @@ -572,7 +572,7 @@ introduce_client(struct Client *source_p) watch_check_hash(source_p, RPL_LOGON); - if (*ubuf == '\0') + if (ubuf[0] == '\0') { ubuf[0] = '+'; ubuf[1] = '\0'; -- cgit