comparison libpurple/protocols/yahoo/util.c @ 28348:617e7a90b69c

Fix a possible crash when receiving URLs in yahoo. It doesn't crash for me but it did for the guy reporting the bug. Might be architecture dependent or compile option dependent. In any case this is bad and we should release 2.6.1 tonight or tomorrow
author Mark Doliner <mark@kingant.net>
date Tue, 18 Aug 2009 23:52:14 +0000
parents 7ee833540b25
children c06114f3d58d
comparison
equal deleted inserted replaced
28347:c69c79921f93 28348:617e7a90b69c
551 cur = xmlnode_new_child(cur, "font"); 551 cur = xmlnode_new_child(cur, "font");
552 xmlnode_set_attrib(cur, "color", code); 552 xmlnode_set_attrib(cur, "color", code);
553 #endif /* !USE_CSS_FORMATTING */ 553 #endif /* !USE_CSS_FORMATTING */
554 554
555 } else if ((match = g_hash_table_lookup(esc_codes_ht, code))) { 555 } else if ((match = g_hash_table_lookup(esc_codes_ht, code))) {
556 gboolean is_closing_tag; 556 /* Some tags are in the hash table only because we
557 gchar *tag_name; 557 * want to ignore them */
558 558 if (match[0] != '\0') {
559 tag_name = yahoo_markup_get_tag_name(match, &is_closing_tag); 559 gboolean is_closing_tag;
560 yahoo_codes_to_html_add_tag(&cur, match, is_closing_tag, tag_name, FALSE); 560 gchar *tag_name;
561 g_free(tag_name); 561 tag_name = yahoo_markup_get_tag_name(match, &is_closing_tag);
562 yahoo_codes_to_html_add_tag(&cur, match, is_closing_tag, tag_name, FALSE);
563 g_free(tag_name);
564 }
562 565
563 } else { 566 } else {
564 purple_debug_error("yahoo", 567 purple_debug_error("yahoo",
565 "Ignoring unknown ansi code 'ESC[%sm'.\n", code); 568 "Ignoring unknown ansi code 'ESC[%sm'.\n", code);
566 } 569 }