From 10f2231bcf72c65389546c999e1d74968c482134 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 25 Mar 2014 17:08:52 +0100 Subject: fixed array out of bounds --- src/eu/siacs/conversations/entities/MucOptions.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/eu/siacs/conversations/entities/MucOptions.java') diff --git a/src/eu/siacs/conversations/entities/MucOptions.java b/src/eu/siacs/conversations/entities/MucOptions.java index 4ed83a5a..e429a5ab 100644 --- a/src/eu/siacs/conversations/entities/MucOptions.java +++ b/src/eu/siacs/conversations/entities/MucOptions.java @@ -101,7 +101,9 @@ public class MucOptions { } public void processPacket(PresencePacket packet) { - String name = packet.getAttribute("from").split("/")[1]; + String[] fromParts = packet.getFrom().split("/"); + if (fromParts.length>=2) { + String name = fromParts[1]; String type = packet.getAttribute("type"); if (type==null) { User user = new User(); @@ -143,6 +145,7 @@ public class MucOptions { } } } + } } public List getUsers() { -- cgit v1.2.3