# HG changeset patch # User Paul Aurich # Date 1259686155 0 # Node ID 3d471a4bafaca9b40419b6d28876d764f5c2e25b # Parent 4ab6f0479bc5f8da236f6694a7521bc6383bb228 strchr() is valid on a UTF8 string when searching for an ASCII character diff -r 4ab6f0479bc5 -r 3d471a4bafac libpurple/protocols/jabber/jingle/session.c --- a/libpurple/protocols/jabber/jingle/session.c Tue Dec 01 16:46:57 2009 +0000 +++ b/libpurple/protocols/jabber/jingle/session.c Tue Dec 01 16:49:15 2009 +0000 @@ -377,7 +377,7 @@ { JingleSession *session = (JingleSession *)value; const gchar *jid = user_data; - gboolean use_bare = g_utf8_strchr(jid, -1, '/') == NULL; + gboolean use_bare = strchr(jid, '/') == NULL; gchar *remote_jid = jingle_session_get_remote_jid(session); gchar *cmp_jid = use_bare ? jabber_get_bare_jid(remote_jid) : g_strdup(remote_jid); @@ -438,7 +438,7 @@ data.jid = jid; data.ret = NULL; - data.use_bare = g_utf8_strchr(jid, -1, '/') == NULL; + data.use_bare = strchr(jid, '/') == NULL; g_hash_table_foreach(js->sessions, find_by_jid_ghr, &data); return data.ret; diff -r 4ab6f0479bc5 -r 3d471a4bafac pidgin/plugins/disco/gtkdisco.c --- a/pidgin/plugins/disco/gtkdisco.c Tue Dec 01 16:46:57 2009 +0000 +++ b/pidgin/plugins/disco/gtkdisco.c Tue Dec 01 16:49:15 2009 +0000 @@ -225,8 +225,8 @@ gtk_widget_set_sensitive(dialog->account_widget, FALSE); username = purple_account_get_username(dialog->account); - at = g_utf8_strchr(username, -1, '@'); - slash = g_utf8_strchr(username, -1, '/'); + at = strchr(username, -1, '@'); + slash = strchr(username, -1, '/'); if (at && !slash) { server = g_strdup_printf("%s", at + 1); } else if (at && slash && at + 1 < slash) {