From a9aaf01f53a4551abb18d23931ac76aeddda1841 Mon Sep 17 00:00:00 2001 From: skotlex Date: Fri, 17 Nov 2006 14:48:50 +0000 Subject: - Fixed client not validating the chat-kick-request packet, which can cause crashes. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9243 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 2 ++ src/map/chat.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 49fb9d7d9..3c826bc73 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. 2006/11/17 + * Fixed client not validating the chat-kick-request packet, which can cause + crashes. [Skotlex] * Updated map_quit to handle removing of players who are not even authenticated yet. [Skotlex] * New connection requests are now also blocked when there's a player diff --git a/src/map/chat.c b/src/map/chat.c index 40050073d..9cc06a4ec 100644 --- a/src/map/chat.c +++ b/src/map/chat.c @@ -257,6 +257,8 @@ int chat_kickchat(struct map_session_data *sd,char *kickusername) cd = (struct chat_data *)map_id2bl(sd->chatID); + if (!cd) return -1; + for(i = 0; i < cd->users; i++) { if (strcmp(cd->usersd[i]->status.name, kickusername) == 0) { if (battle_config.gm_kick_chat && pc_isGM(cd->usersd[i]) >= battle_config.gm_kick_chat) -- cgit v1.2.3-70-g09d2