From 2e7268cde1710b4901e6db52c0868bd597b88dbc Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Tue, 3 Mar 2009 07:52:58 +0200 Subject: [PATCH] silcd: IDENTIFY command reply didn't save client correctly The IDENTIFY command reply added sometimes new client without duplicating the nickname of the client thus causing odd crashes later when trying to free the nickname. --- apps/silcd/command_reply.c | 3 ++- apps/silcd/silcd.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/silcd/command_reply.c b/apps/silcd/command_reply.c index a31588d6..688b8567 100644 --- a/apps/silcd/command_reply.c +++ b/apps/silcd/command_reply.c @@ -652,7 +652,8 @@ silc_server_command_reply_identify_save(SilcServerCommandReplyContext cmd) to global list since server didn't have it in the lists so it must be global. */ client = silc_idlist_add_client(server->global_list, - nick[0] ? nick : NULL, info, NULL, + nick[0] ? strdup(nick) : NULL, + info, NULL, silc_id_dup(&client_id, SILC_ID_CLIENT), silc_packet_get_context(cmd->sock), NULL); diff --git a/apps/silcd/silcd.c b/apps/silcd/silcd.c index 3d4db10e..cc4d7ff3 100644 --- a/apps/silcd/silcd.c +++ b/apps/silcd/silcd.c @@ -462,7 +462,7 @@ static DebugLevel debug_levels[] = { { 7, "silcd\\.c,server\\.c,command\\.c,server_backup\\.c,packet_send\\.c" }, /* All basic stuff from silcd/ */ - { 10, "silc_server_*,*silc_id_create_*" }, + { 10, "silc_server_*,*silc_id_create_*,*idlist*" }, /* All from silcd/ */ { 15, "*silcd*,*serverid*,silc_server_*,*idlist*" }, -- 2.24.0