aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-05-23 10:15:58 +0200
committerDaniel Gultsch <daniel@gultsch.de>2014-05-23 10:15:58 +0200
commit8133dcd881af0d89b0ed32d7da944b425975597a (patch)
treea15e972238f00af82714da22fc3a31f47dff900a /src/eu/siacs/conversations
parenta5d54d70eed7f8c6ddfbd6f4627d0f497aabcb37 (diff)
fixed possible npe
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/xmpp/XmppConnection.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/xmpp/XmppConnection.java b/src/eu/siacs/conversations/xmpp/XmppConnection.java
index fa4fa10a..a1aaf66a 100644
--- a/src/eu/siacs/conversations/xmpp/XmppConnection.java
+++ b/src/eu/siacs/conversations/xmpp/XmppConnection.java
@@ -330,6 +330,9 @@ public class XmppConnection implements Runnable {
}
element.setAttributes(currentTag.getAttributes());
Tag nextTag = tagReader.readTag();
+ if (nextTag==null) {
+ throw new IOException("interrupted mid tag");
+ }
while (!nextTag.isEnd(element.getName())) {
if (!nextTag.isNo()) {
Element child = tagReader.readElement(nextTag);
@@ -341,6 +344,9 @@ public class XmppConnection implements Runnable {
element.addChild(child);
}
nextTag = tagReader.readTag();
+ if (nextTag==null) {
+ throw new IOException("interrupted mid tag");
+ }
}
++stanzasReceived;
lastPaketReceived = SystemClock.elapsedRealtime();