changeset 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 77423ba51dd4
children 07718e5eb8ce daa709ff32e3
files libpurple/protocols/msn/slp.c
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
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);