# HG changeset patch # User Paul Aurich # Date 1305088196 0 # Node ID 9449f70762e7be6d6754b72f60983df5b1a3c9bd # Parent f762bcb55249354d77796a363d9b137dd178aa1b silc: Avoid calling strstr(NULL, ...) if chname isn't set. diff -r f762bcb55249 -r 9449f70762e7 libpurple/protocols/silc/chat.c --- a/libpurple/protocols/silc/chat.c Wed May 11 04:20:12 2011 +0000 +++ b/libpurple/protocols/silc/chat.c Wed May 11 04:29:56 2011 +0000 @@ -894,9 +894,10 @@ if (components) chname = g_hash_table_lookup(components, "channel"); - if (chname) - channel = silc_client_get_channel(sg->client, sg->conn, - (char *)chname); + if (!chname) + return NULL; + channel = silc_client_get_channel(sg->client, sg->conn, + (char *)chname); if (channel) { chu = silc_client_on_channel(channel, conn->local_entry); if (chu)