pidgin: 40f49dac: Fix a printf("%s", NULL). Fixes #7289.

datallah at pidgin.im datallah at pidgin.im
Sun Oct 19 21:16:04 EDT 2008


-----------------------------------------------------------------
Revision: 40f49dac223b2abd50e40babe786ada27963162b
Ancestor: aad9cd2bd4296ab92672559fbee882d7ef2a2406
Author: datallah at pidgin.im
Date: 2008-10-20T00:55:11
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/40f49dac223b2abd50e40babe786ada27963162b

Modified files:
        libpurple/certificate.c

ChangeLog: 

Fix a printf("%s", NULL). Fixes #7289.

-------------- next part --------------
============================================================
--- libpurple/certificate.c	367e38a52f59a0418e5c70be63a15c4c3c332ea9
+++ libpurple/certificate.c	33177259c4b70a9a691c57efd288c4663a92327b
@@ -137,17 +137,17 @@ purple_certificate_copy_list(GList *crt_
 GList *
 purple_certificate_copy_list(GList *crt_list)
 {
-	GList *new, *l;
+	GList *new_l, *l;
 
 	/* First, make a shallow copy of the list */
-	new = g_list_copy(crt_list);
+	new_l = g_list_copy(crt_list);
 
 	/* Now go through and actually duplicate each certificate */
-	for (l = new; l; l = l->next) {
+	for (l = new_l; l; l = l->next) {
 		l->data = purple_certificate_copy(l->data);
 	}
 
-	return new;
+	return new_l;
 }
 
 void
@@ -1897,10 +1897,13 @@ purple_certificate_display_x509(PurpleCe
 
 	/* Make messages */
 	secondary = g_strdup_printf(_("Common name: %s\n\n"
-				      "Fingerprint (SHA1): %s\n\n"
-				      "Activation date: %s\n"
-				      "Expiration date: %s\n"),
-				    cn, sha_asc, activ_str, expir_str);
+								  "Fingerprint (SHA1): %s\n\n"
+								  "Activation date: %s\n"
+								  "Expiration date: %s\n"),
+								cn ? cn : "(null)",
+								sha_asc ? sha_asc : "(null)",
+								activ_str ? activ_str : "(null)",
+								expir_str ? expir_str : "(null)");
 
 	/* Make a semi-pretty display */
 	purple_notify_info(


More information about the Commits mailing list