Fix #4345 by ignoring a malformed message.

Wed, 12 Dec 2007 19:15:01 +0000

author
Daniel Atallah <datallah@pidgin.im>
date
Wed, 12 Dec 2007 19:15:01 +0000
changeset 21939
8d8200de2ade
parent 21938
615d1409985d
child 21940
4bcf061ef95b

Fix #4345 by ignoring a malformed message.

libpurple/protocols/simple/sipmsg.c file | annotate | diff | comparison | revisions
--- a/libpurple/protocols/simple/sipmsg.c	Wed Dec 12 01:53:00 2007 +0000
+++ b/libpurple/protocols/simple/sipmsg.c	Wed Dec 12 19:15:01 2007 +0000
@@ -45,7 +45,10 @@
 	line = g_strndup(msg, tmp - msg);
 
 	smsg = sipmsg_parse_header(line);
-	smsg->body = g_strdup(tmp + 4);
+	if(smsg != NULL)
+		smsg->body = g_strdup(tmp + 4);
+	else
+		purple_debug_error("SIMPLE", "No header parsed from line: %s\n", line);
 
 	g_free(line);
 	return smsg;

mercurial