From 9744d53ec9024a7fa2ec017229bc384086964db1 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 13 May 2014 19:21:27 -0400 Subject: [PATCH] Fix buffer overflow in introduce_client and burst_TS6 If the client being introduced has more than 10 user modes send_umode() will overflow ubuf --- src/s_serv.c | 2 +- src/s_user.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/s_serv.c b/src/s_serv.c index d7e73bed..7c7e10db 100644 --- a/src/s_serv.c +++ b/src/s_serv.c @@ -555,7 +555,7 @@ burst_modes_TS6(struct Client *client_p, struct Channel *chptr, static void burst_TS6(struct Client *client_p) { - static char ubuf[12]; + char ubuf[BUFSIZE]; struct Client *target_p; struct Channel *chptr; struct membership *msptr; diff --git a/src/s_user.c b/src/s_user.c index 4b397659..2d7705dc 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -592,7 +592,7 @@ register_local_user(struct Client *client_p, struct Client *source_p, const char int introduce_client(struct Client *client_p, struct Client *source_p, struct User *user, const char *nick, int use_euid) { - static char ubuf[12]; + char ubuf[BUFSIZE]; struct Client *identifyservice_p; char *p; hook_data_umode_changed hdata;