pidgin: 5d299fb5: Fixes for some potential printf("%s", NU...

nosnilmot at pidgin.im nosnilmot at pidgin.im
Mon Jul 27 22:35:44 EDT 2009


-----------------------------------------------------------------
Revision: 5d299fb56a8e77822296cd70281b61ed0fa3b613
Ancestor: 0de28f7e416df0e0c2b7f9a996fe1f0f3638f7dc
Author: nosnilmot at pidgin.im
Date: 2009-07-28T02:30:39
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/5d299fb56a8e77822296cd70281b61ed0fa3b613

Modified files:
        libpurple/media.c libpurple/protocols/jabber/jingle/rtp.c
        pidgin/gtkmedia.c

ChangeLog: 

Fixes for some potential printf("%s", NULL) type of problems from Maiku

-------------- next part --------------
============================================================
--- libpurple/media.c	11ebaaa3295e0608b74d89b3dffe3e11810c67c5
+++ libpurple/media.c	af854178db05dbeb0b4f15f00082fb424bc54c9e
@@ -2729,7 +2729,8 @@ purple_media_add_remote_candidates(Purpl
 		purple_debug_error("media",
 				"purple_media_add_remote_candidates: "
 				"couldn't find stream %s %s.\n",
-				sess_id, participant);
+				sess_id ? sess_id : "(null)",
+				participant ? participant : "(null)");
 		return;
 	}
 
============================================================
--- libpurple/protocols/jabber/jingle/rtp.c	1721599bb218f4fbcc5fc9dea1dd168260e5277f
+++ libpurple/protocols/jabber/jingle/rtp.c	6a89490279c2bcf0c5a379165313c73d5ef5b098
@@ -457,7 +457,8 @@ jingle_rtp_state_changed_cb(PurpleMedia 
 		gchar *sid, gchar *name, JingleSession *session)
 {
 	purple_debug_info("jingle-rtp", "state-changed: state %d "
-			"id: %s name: %s\n", state, sid, name);
+			"id: %s name: %s\n", state, sid ? sid : "(null)",
+			name ? name : "(null)");
 }
 
 static void
@@ -466,7 +467,8 @@ jingle_rtp_stream_info_cb(PurpleMedia *m
 		JingleSession *session)
 {
 	purple_debug_info("jingle-rtp", "stream-info: type %d "
-			"id: %s name: %s\n", type, sid, name);
+			"id: %s name: %s\n", type, sid ? sid : "(null)",
+			name ? name : "(null)");
 
 	g_return_if_fail(JINGLE_IS_SESSION(session));
 
============================================================
--- pidgin/gtkmedia.c	853da35970f524a309a0b34732fb4cd2aa50b33e
+++ pidgin/gtkmedia.c	855da4cce0cfdd7bf220ebfe558df429182f52a4
@@ -803,7 +803,7 @@ pidgin_media_state_changed_cb(PurpleMedi
 		gchar *sid, gchar *name, PidginMedia *gtkmedia)
 {
 	purple_debug_info("gtkmedia", "state: %d sid: %s name: %s\n",
-			state, sid, name);
+			state, sid ? sid : "(null)", name ? name : "(null)");
 	if (sid == NULL && name == NULL) {
 		if (state == PURPLE_MEDIA_STATE_END) {
 			pidgin_media_emit_message(gtkmedia,


More information about the Commits mailing list