pidgin: d5a487de: Actually reject content unknown content ...
malu at pidgin.im
malu at pidgin.im
Wed Apr 22 14:40:45 EDT 2009
-----------------------------------------------------------------
Revision: d5a487de6cafd4f773a3cc1b9b08d6081771e9de
Ancestor: 2e248a5affa62a888ecb076170dd36d05d02dc83
Author: malu at pidgin.im
Date: 2009-04-22T18:37:23
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/d5a487de6cafd4f773a3cc1b9b08d6081771e9de
Modified files:
libpurple/protocols/jabber/jingle/content.c
ChangeLog:
Actually reject content unknown content types on Jingle session-initiate,
instead of crashing :)
I found this while tinkering with Jingle FT, when it sent such an initiate
(because of hashed caps, I believe).
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jingle/content.c 1124b26c1e1dce1380a9dc2e92365b7027c22a9f
+++ libpurple/protocols/jabber/jingle/content.c 53ed96173d57b40ede9508e27eb1277a431f5dd4
@@ -391,7 +391,13 @@ jingle_content_parse(xmlnode *content)
jingle_content_parse(xmlnode *content)
{
const gchar *type = xmlnode_get_namespace(xmlnode_get_child(content, "description"));
- return JINGLE_CONTENT_CLASS(g_type_class_ref(jingle_get_type(type)))->parse(content);
+ GType jingle_type = jingle_get_type(type);
+
+ if (jingle_type != G_TYPE_NONE) {
+ return JINGLE_CONTENT_CLASS(g_type_class_ref(jingle_type))->parse(content);
+ } else {
+ return NULL;
+ }
}
static xmlnode *
More information about the Commits
mailing list