Ignore SLP invites if they do not contain all the required fields. The
authorElliott Sales de Andrade <qulogic@pidgin.im>
Tue, 01 Sep 2009 23:06:25 +0000
changeset2431bae68adf pushlog
parent 2fbf7a2c276b
child 850dc251c138
child 931a129ce395
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.
libpurple/protocols/msn/slp.c
     1.1 --- a/libpurple/protocols/msn/slp.c
     1.2 +++ b/libpurple/protocols/msn/slp.c
     1.3 @@ -708,7 +708,15 @@
     1.4  
     1.5  		content = get_token(body, "\r\n\r\n", NULL);
     1.6  
     1.7 -		got_invite(slpcall, branch, content_type, content);
     1.8 +		if (branch && content_type && content)
     1.9 +		{
    1.10 +			got_invite(slpcall, branch, content_type, content);
    1.11 +		}
    1.12 +		else
    1.13 +		{
    1.14 +			msn_slpcall_destroy(slpcall);
    1.15 +			slpcall = NULL;
    1.16 +		}
    1.17  
    1.18  		g_free(branch);
    1.19  		g_free(content_type);