diff libpurple/protocols/jabber/jingle/jingle.c @ 31108:4b101cad58e7

Don't crash on invalid/unexpected jingle transport types. Fixes #13136. committer: John Bailey <rekkanoryo@rekkanoryo.org>
author nikita@beem-project.com
date Sat, 08 Jan 2011 02:58:06 +0000
parents a8cc50c2279f
children 231c9635b82a
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jingle/jingle.c	Sat Jan 08 02:34:47 2011 +0000
+++ b/libpurple/protocols/jabber/jingle/jingle.c	Sat Jan 08 02:58:06 2011 +0000
@@ -42,6 +42,9 @@
 GType
 jingle_get_type(const gchar *type)
 {
+	if (type == NULL)
+		return G_TYPE_NONE;
+
 	if (!strcmp(type, JINGLE_TRANSPORT_RAWUDP))
 		return JINGLE_TYPE_RAWUDP;
 	else if (!strcmp(type, JINGLE_TRANSPORT_ICEUDP))