aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-07-03 11:32:54 +0200
committeriNPUTmice <daniel@gultsch.de>2014-07-03 11:32:54 +0200
commite02ae4cde20eaacd006609b1545a0e5da3b9d4e3 (patch)
treee24c3912abc22ecca9b0923c396e7b71232aebcc /src/eu/siacs/conversations
parentaa1665e359f847a5ebf393c7339e09fe116e61cf (diff)
fixed array out of bounds in isMuc
Diffstat (limited to 'src/eu/siacs/conversations')
-rw-r--r--src/eu/siacs/conversations/ui/ContactsActivity.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/eu/siacs/conversations/ui/ContactsActivity.java b/src/eu/siacs/conversations/ui/ContactsActivity.java
index 811ae876..fee3de7a 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) {