changeset 24270:e265e7066598

Fix a printf("%s", NULL). Fixes #7289.
author Daniel Atallah <daniel.atallah@gmail.com>
date Mon, 20 Oct 2008 00:55:11 +0000
parents d37bff820b2d
children 000934ab134f
files libpurple/certificate.c
diffstat 1 files changed, 11 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/certificate.c	Sun Oct 19 06:27:47 2008 +0000
+++ b/libpurple/certificate.c	Mon Oct 20 00:55:11 2008 +0000
@@ -137,17 +137,17 @@
 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 @@
 
 	/* 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(