From 50f5ce9d321cc7853898b0b171c608dd72ec778e Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Wed, 9 Dec 2009 19:30:08 +0100 Subject: [PATCH] Fix bug #100 - Null pointer crash if sending a chat message without the message part. --- src/core/hub.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/hub.c b/src/core/hub.c index dbf92e6..1946383 100644 --- a/src/core/hub.c +++ b/src/core/hub.c @@ -183,7 +183,10 @@ int hub_handle_chat_message(struct hub_info* hub, struct hub_user* u, struct adc char* message = adc_msg_get_argument(cmd, 0); int ret = 0; int relay = 1; - + + if (!message) + return 0; + if ((cmd->cache[0] == 'B') && (message[0] == '!' || message[0] == '+')) { /*