pidgin: 10c09e81: silc: Avoid calling strstr(NULL, ...) if...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Wed May 11 00:44:13 EDT 2011


----------------------------------------------------------------------
Revision: 10c09e81a8858ab1237bf18192e891b9cabd59c0
Parent:   6d613787422d177deecd8246bbbbaa1beb2a539d
Author:   darkrain42 at pidgin.im
Date:     05/11/11 00:29:56
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/10c09e81a8858ab1237bf18192e891b9cabd59c0

Changelog: 

silc: Avoid calling strstr(NULL, ...) if chname isn't set.

Changes against parent 6d613787422d177deecd8246bbbbaa1beb2a539d

  patched  libpurple/protocols/silc/chat.c

-------------- next part --------------
============================================================
--- libpurple/protocols/silc/chat.c	f676dc79de01ae522f1c92ac7129eee2c3cdd516
+++ libpurple/protocols/silc/chat.c	ea6c53dd81fef7750bcfcb5b05fb23b6b6c19e8d
@@ -894,9 +894,10 @@ GList *silcpurple_chat_menu(PurpleChat *
 
 	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)


More information about the Commits mailing list