From e02ae4cde20eaacd006609b1545a0e5da3b9d4e3 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Thu, 3 Jul 2014 11:32:54 +0200 Subject: [PATCH] fixed array out of bounds in isMuc --- src/eu/siacs/conversations/ui/ContactsActivity.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/eu/siacs/conversations/ui/ContactsActivity.java b/src/eu/siacs/conversations/ui/ContactsActivity.java index 811ae876f..fee3de7a7 100644 --- a/src/eu/siacs/conversations/ui/ContactsActivity.java +++ b/src/eu/siacs/conversations/ui/ContactsActivity.java @@ -485,8 +485,11 @@ public class ContactsActivity extends XmppActivity { } private boolean isMuc(Contact contact) { - String server = contact.getJid().split("@")[1]; - return getMucServers().contains(server); + String[] parts = contact.getJid().split("@"); + if (parts.length != 2) { + return false; + } + return getMucServers().contains(parts[1]); } public void startConversation(Contact contact, Account account, boolean muc) {