From: <mar...@us...> - 2007-04-04 04:02:29
|
Revision: 18231 http://svn.sourceforge.net/gaim/?rev=18231&view=rev Author: markhuetsch Date: 2007-04-03 21:02:28 -0700 (Tue, 03 Apr 2007) Log Message: ----------- Bug 1658961 fixed by gnap. Modified Paths: -------------- trunk/libgaim/protocols/qq/im.c Modified: trunk/libgaim/protocols/qq/im.c =================================================================== --- trunk/libgaim/protocols/qq/im.c 2007-04-04 03:51:32 UTC (rev 18230) +++ trunk/libgaim/protocols/qq/im.c 2007-04-04 04:02:28 UTC (rev 18231) @@ -123,7 +123,7 @@ const gchar *font_name, gboolean is_bold, gboolean is_italic, gboolean is_underline, gint tail_len) { - gchar *s1, *s2; + gchar *s1; unsigned char *rgb; gint font_name_len; guint8 *send_im_tail; @@ -159,13 +159,19 @@ s1 = g_strndup(font_color + 1, 6); /* Henry: maybe this is a bug of gaim, the string should have * the length of odd number @_@ + * George Ang: This BUG maybe fixed by Gaim. adding new byte would cause a crash. */ - s2 = g_strdup_printf("%sH", s1); - rgb = gaim_base16_decode(s2, NULL); + /* s2 = g_strdup_printf("%sH", s1); */ + rgb = gaim_base16_decode(s1, NULL); g_free(s1); - g_free(s2); - memcpy(send_im_tail + 2, rgb, 3); - g_free(rgb); + /* g_free(s2); */ + if ( rgb ) + { + memcpy(send_im_tail + 2, rgb, 3); + g_free(rgb); + } else { + send_im_tail[2] = send_im_tail[3] = send_im_tail[4] = 0; + } } else { send_im_tail[2] = send_im_tail[3] = send_im_tail[4] = 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |