pidgin: 03e0254c: Commit the QQ null chat room name crash ...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Tue Jul 14 16:00:41 EDT 2009


-----------------------------------------------------------------
Revision: 03e0254c6871c4730755a200d34d4adacdf40c66
Ancestor: 97e5ac91f0ed5cbe744a8a399ea990d71f458a61
Author: darkrain42 at pidgin.im
Date: 2009-07-14T19:55:40
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/03e0254c6871c4730755a200d34d4adacdf40c66

Modified files:
        libpurple/protocols/qq/group_im.c libpurple/server.c

ChangeLog: 

Commit the QQ null chat room name crash on the *right* branch.

*** Plucked rev d3a2bc4e480b1ff46d215d1622464bd613a5286d (darkrain42 at pidgin.im):
Fix a crash when joining a chat room with NULL name. Closes #7568.


-------------- next part --------------
============================================================
--- libpurple/protocols/qq/group_im.c	7780cc5add63d1a8c296c6c13b31c835e266dc1e
+++ libpurple/protocols/qq/group_im.c	5ee39774770ef836d3a730572cd8ded667312e04
@@ -52,6 +52,7 @@ PurpleConversation *qq_room_conv_open(Pu
 	gchar *topic_utf8;
 
 	g_return_val_if_fail(rmd != NULL, NULL);
+	g_return_val_if_fail(rmd->title_utf8, NULL);
 	qd = (qq_data *) gc->proto_data;
 
 	conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT,
============================================================
--- libpurple/server.c	8730c7801e191207259746e59cbe9f4618e20f6b
+++ libpurple/server.c	863f6dedb4926476e4134032a03dd0e515bdd1b4
@@ -862,7 +862,12 @@ PurpleConversation *serv_got_joined_chat
 
 	account = purple_connection_get_account(gc);
 
+	g_return_val_if_fail(account != NULL, NULL);
+	g_return_val_if_fail(name != NULL, NULL);
+
 	conv = purple_conversation_new(PURPLE_CONV_TYPE_CHAT, account, name);
+	g_return_val_if_fail(conv != NULL, NULL);
+
 	chat = PURPLE_CONV_CHAT(conv);
 
 	if (!g_slist_find(gc->buddy_chats, conv))


More information about the Commits mailing list