pidgin: 0c632f59: Remove duplicate calls to msn_slpmsg_set...

qulogic at pidgin.im qulogic at pidgin.im
Thu Jul 14 02:01:55 EDT 2011


----------------------------------------------------------------------
Revision: 0c632f590d463f7d1615272d2651095b77504a8a
Parent:   906964904ac9b3c24c992e73bc9c2e0e0efea5fc
Author:   qulogic at pidgin.im
Date:     07/14/11 01:54:10
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/0c632f590d463f7d1615272d2651095b77504a8a

Changelog: 

Remove duplicate calls to msn_slpmsg_set_slplink. This function is
already called when a slpmsg is created, and calling it again will
place the slpmsg on the slplink list an extra time. If the slpmsg is
freed, then the first entry is removed, but the second remains, and
can cause crashes due to invalid memory accesses.

Fixes #14307.

Changes against parent 906964904ac9b3c24c992e73bc9c2e0e0efea5fc

  patched  ChangeLog
  patched  libpurple/protocols/msn/slp.c
  patched  libpurple/protocols/msn/slpcall.c

-------------- next part --------------
============================================================
--- ChangeLog	4e07fe79cf04d28b2ae2cd11e90c919ca53b4c0e
+++ ChangeLog	35a3ca25c31b2850a1a69f033ea38fb59443fd1b
@@ -13,6 +13,9 @@ version 2.10.0 (MM/DD/YYYY):
 	* Better status message handling. (Tomasz Wasilczyk) (#14314)
 	* Merged two buddy blocking methods. (Tomasz Wasilczyk) (#5303)
 
+	MSN:
+	* Fix seemingly random crashing. (#14307)
+
 	XMPP:
 	* Do not generate malformed XML ("</>") when setting an empty mood.
 	  (#14342)
============================================================
--- libpurple/protocols/msn/slp.c	70aadf51137bb3c88d4817bfb781a48198e1888a
+++ libpurple/protocols/msn/slp.c	1b96a2bb84d01ea73ca3b71579df4a3841244f0d
@@ -284,7 +284,6 @@ send_file_cb(MsnSlpCall *slpcall)
 	purple_xfer_unref(xfer);
 
 	slpmsg = msn_slpmsg_file_new(slpcall, purple_xfer_get_size(xfer));
-	msn_slpmsg_set_slplink(slpmsg, slpcall->slplink);
 
 	msn_slplink_send_slpmsg(slpcall->slplink, slpmsg);
 }
============================================================
--- libpurple/protocols/msn/slpcall.c	bc8f60feff42d958a59ce40e6dbe3fa1948a9c4e
+++ libpurple/protocols/msn/slpcall.c	cebfaa918ffb28c9fd14de096ab241e8247d53c9
@@ -490,12 +490,10 @@ got_sessionreq(MsnSlpCall *slpcall, cons
 		if (img != NULL) {
 			/* DATA PREP */
 			slpmsg = msn_slpmsg_dataprep_new(slpcall);
-			msn_slpmsg_set_slplink(slpmsg, slplink);
 			msn_slplink_queue_slpmsg(slplink, slpmsg);
 
 			/* DATA */
 			slpmsg = msn_slpmsg_obj_new(slpcall, img);
-			msn_slpmsg_set_slplink(slpmsg, slplink);
 			msn_slplink_queue_slpmsg(slplink, slpmsg);
 			purple_imgstore_unref(img);
 


More information about the Commits mailing list