pidgin: a74b1f15: This should prevent the crash in #8109 b...

datallah at pidgin.im datallah at pidgin.im
Wed Jan 14 23:01:33 EST 2009


-----------------------------------------------------------------
Revision: a74b1f153eae510566148ee5430cbd11c02c1832
Ancestor: bcecb3c1d1b71dbd97fca74a70015c1d2acfa46d
Author: datallah at pidgin.im
Date: 2009-01-15T03:54:58
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/a74b1f153eae510566148ee5430cbd11c02c1832

Modified files:
        libpurple/protocols/msn/slplink.c

ChangeLog: 

This should prevent the crash in #8109 by stopping an invalid message from
getting in the queue.  There is still a problem farther up from here in that
an invalid message shouldn't get this far - hopefully this will help track it
down by providing a message at the time the issue happens instead of crashing
later.  Fixes #8109.

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/slplink.c	1a47cc3b9f98e1f5399179728a00689d1a4f63ca
+++ libpurple/protocols/msn/slplink.c	679a2f7d3e14f984fad46bd26882e69790cdaa72
@@ -398,6 +398,8 @@ msn_slplink_queue_slpmsg(MsnSlpLink *slp
 void
 msn_slplink_queue_slpmsg(MsnSlpLink *slplink, MsnSlpMessage *slpmsg)
 {
+	g_return_if_fail(slpmsg != NULL);
+
 	slpmsg->id = slplink->slp_seq_id++;
 
 	g_queue_push_tail(slplink->slp_msg_queue, slpmsg);


More information about the Commits mailing list