# HG changeset patch # User Mark Doliner # Date 1081997555 0 # Node ID 493e0df74180e52ead2c62e34090917b46ec71bf # Parent 7a99cfed1996f038186a2a1887cea3813f7d69b6 [gaim-migrate @ 9419] Give a message when trillian users try to type non-ascii characters in a chat. Previously Gaim just crashed. Stupid strlen(NULL); committer: Tailor Script diff -r 7a99cfed1996 -r 493e0df74180 src/protocols/oscar/oscar.c --- a/src/protocols/oscar/oscar.c Thu Apr 15 02:23:28 2004 +0000 +++ b/src/protocols/oscar/oscar.c Thu Apr 15 02:52:35 2004 +0000 @@ -3544,6 +3544,9 @@ va_end(ap); utf8 = oscar_encoding_to_utf8(charset, msg, len); + if (utf8 == NULL) + /* The conversion failed! */ + utf8 = g_strdup(_("[Unable to display a message from this user because it contained invalid characters.")); serv_got_chat_in(gc, ccon->id, info->sn, 0, utf8, time((time_t)NULL)); g_free(utf8);