changeset 27712:813f2eb3fdc8

Fixes for some potential printf("%s", NULL) type of problems from Maiku
author Stu Tomlinson <stu@nosnilmot.com>
date Tue, 28 Jul 2009 02:30:39 +0000
parents c1314a6cefcf
children 9776f3c01268
files libpurple/media.c libpurple/protocols/jabber/jingle/rtp.c pidgin/gtkmedia.c
diffstat 3 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/media.c	Tue Jul 28 01:23:39 2009 +0000
+++ b/libpurple/media.c	Tue Jul 28 02:30:39 2009 +0000
@@ -2729,7 +2729,8 @@
 		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;
 	}
 
--- a/libpurple/protocols/jabber/jingle/rtp.c	Tue Jul 28 01:23:39 2009 +0000
+++ b/libpurple/protocols/jabber/jingle/rtp.c	Tue Jul 28 02:30:39 2009 +0000
@@ -457,7 +457,8 @@
 		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 @@
 		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));
 
--- a/pidgin/gtkmedia.c	Tue Jul 28 01:23:39 2009 +0000
+++ b/pidgin/gtkmedia.c	Tue Jul 28 02:30:39 2009 +0000
@@ -803,7 +803,7 @@
 		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,