diff libpurple/protocols/msn/slp.c @ 28525:5546612e70e2

Ignore SLP invites if they do not contain all the required fields. The latest development KMess client appears to send a MsnObject that's just full of NULL's, triggering this crash. Fixes #10159.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Tue, 01 Sep 2009 23:06:25 +0000
parents c9e760d350b8
children 59b0c556f787 1be982612d9a
line wrap: on
line diff
--- a/libpurple/protocols/msn/slp.c	Tue Sep 01 17:44:35 2009 +0000
+++ b/libpurple/protocols/msn/slp.c	Tue Sep 01 23:06:25 2009 +0000
@@ -708,7 +708,15 @@
 
 		content = get_token(body, "\r\n\r\n", NULL);
 
-		got_invite(slpcall, branch, content_type, content);
+		if (branch && content_type && content)
+		{
+			got_invite(slpcall, branch, content_type, content);
+		}
+		else
+		{
+			msn_slpcall_destroy(slpcall);
+			slpcall = NULL;
+		}
 
 		g_free(branch);
 		g_free(content_type);