pidgin: 936fb359: If the default value of a list-single or...

deryni at pidgin.im deryni at pidgin.im
Wed Mar 19 23:40:55 EDT 2008


-----------------------------------------------------------------
Revision: 936fb35924ee04ab0274875100b8b63d7feca83d
Ancestor: 55d6c1b3d8879cac99bae280384a1b4233840493
Author: deryni at pidgin.im
Date: 2008-03-20T02:59:50
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/936fb35924ee04ab0274875100b8b63d7feca83d

Modified files:
        ChangeLog libpurple/protocols/jabber/xdata.c

ChangeLog: 

If the default value of a list-single or list-multi data forms field is NULL
(<value/> or <value></value>) don't stick NULL in the selected list (this will
crash in the g_list_find_custom call later).

-------------- next part --------------
============================================================
--- ChangeLog	4b665a6f776c1315d035ad109f16e8431933169f
+++ ChangeLog	9304883023b8b0a922b3991b38dcd277666d1ffb
@@ -16,6 +16,7 @@ version 2.4.1 ():
 	* Fix a crash when starting if you have a Zephyr account
 	* Increase XMPP ping timeout to 120 seconds, to prevent poor network
 	  connections from timing out unnecessarily.
+	* Don't crash on XMPP forms with empty default values.
 
 	Pidgin:
 	* Remove a workaround for older versions gstreamer that was causing
============================================================
--- libpurple/protocols/jabber/xdata.c	a5bb60f9c19aeee1e75bf8c583b70f7956483f14
+++ libpurple/protocols/jabber/xdata.c	24b29e9725ec12a60aa44d58cec57665ac334c75
@@ -285,7 +285,10 @@ void *jabber_x_data_request_with_actions
 
 			for(valuenode = xmlnode_get_child(fn, "value"); valuenode;
 					valuenode = xmlnode_get_next_twin(valuenode)) {
-				selected = g_list_prepend(selected, xmlnode_get_data(valuenode));
+				char *data = xmlnode_get_data(valuenode);
+				if (data != NULL) {
+					selected = g_list_prepend(selected, data);
+				}
 			}
 
 			for(optnode = xmlnode_get_child(fn, "option"); optnode;


More information about the Commits mailing list