[Pidgin] #14295: aim_ssi_item_debug_append() uses NULL string as string pointer to printf()
Pidgin
trac at pidgin.im
Wed Jun 15 08:59:12 EDT 2011
#14295: aim_ssi_item_debug_append() uses NULL string as string pointer to printf()
------------------------------------+---------------------------------------
Reporter: clh | Owner: MarkDoliner
Type: patch | Status: new
Milestone: Patches Needing Review | Component: AIM
Version: 2.8.0 | Resolution:
Keywords: |
------------------------------------+---------------------------------------
Comment(by dustin):
Replying to [ticket:14295 clh]:
My apologies, I thought at least glib would deal with NULL strings, so
there wouldn't be problems.
However, I would suggest denoting a NULL string by "(null)" to maintain
the distinction (as 'no entry' vs. 'entry with empty string' may also
cause different behaviours):
{{{
--- family_feedbag.c.orig Tue Jun 7 10:44:41 2011
+++ family_feedbag.c Tue Jun 14 20:42:30 2011
@@ -100,7 +100,7 @@
{
g_string_append_printf(str,
"%s gid=0x%04hx, bid=0x%04hx, list_type=0x%04hx [%s],
name=%s.\n",
- prefix, item->gid, item->bid, item->type,
aim_ssi_type_to_string(item->type), item->name);
+ prefix, item->gid, item->bid, item->type,
aim_ssi_type_to_string(item->type), item->name?item->name:"(null)");
}
}}}
These lines in `oscar.c` also may write NULL strings to the debug output,
do they also cause this error?
{{{
purple_debug_info("oscar", "Activating status '%s' for
buddy %s, message = '%s', itmsurl = '%s'\n", status_id, info->bn, message,
itmsurl);
purple_prpl_got_user_status(account, info->bn, status_id,
"message", message, "itmsurl", itmsurl, NULL);
} else {
purple_debug_info("oscar", "Activating status '%s' for
buddy %s, message = '%s'\n", status_id, info->bn, message);
purple_prpl_got_user_status(account, info->bn, status_id,
"message", message, NULL);
}
}}}
--
Ticket URL: <http://developer.pidgin.im/ticket/14295#comment:3>
Pidgin <http://pidgin.im>
Pidgin
More information about the Tracker
mailing list