Mercurial > pidgin.yaz
changeset 8667:493e0df74180
[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 <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 15 Apr 2004 02:52:35 +0000 |
parents | 7a99cfed1996 |
children | e71eef9dc37f |
files | src/protocols/oscar/oscar.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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);