pidgin: 21a15da2: The connection display name can be NULL,...
qulogic at pidgin.im
qulogic at pidgin.im
Fri Oct 23 02:32:21 EDT 2009
-----------------------------------------------------------------
Revision: 21a15da20dc9d730c4e51b3c3543189aaa6bbcea
Ancestor: cdf3615ec8283fb7d859b5cf3cb37855aa10182e
Author: qulogic at pidgin.im
Date: 2009-10-23T06:24:24
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/21a15da20dc9d730c4e51b3c3543189aaa6bbcea
Modified files:
libpurple/protocols/msn/contact.c
ChangeLog:
The connection display name can be NULL, so make sure we don't try to use
that in a printf.
Fixes #10529.
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/contact.c da021691b4925c7412c15b3377e07165563c089a
+++ libpurple/protocols/msn/contact.c 4e7e5c11fec13eed105fdcbeb2947a76f302155a
@@ -1232,8 +1232,13 @@ msn_add_contact_to_group(MsnSession *ses
if (user->invite_message) {
char *tmp;
body = g_markup_escape_text(user->invite_message, -1);
- tmp = g_markup_escape_text(purple_connection_get_display_name(session->account->gc), -1);
+
+ /* Ignore the cast, we treat it as const anyway. */
+ tmp = (char *)purple_connection_get_display_name(session->account->gc);
+ tmp = tmp ? g_markup_escape_text(tmp, -1) : g_strdup("");
+
invite = g_strdup_printf(MSN_CONTACT_INVITE_MESSAGE_XML, body, tmp);
+
g_free(body);
g_free(tmp);
More information about the Commits
mailing list