mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-25 21:42:07 +01:00
Fix parsing exception causing infinite loop
Fixes SMACK-613
This commit is contained in:
parent
039fac7ab7
commit
674df78741
1 changed files with 12 additions and 0 deletions
|
@ -160,6 +160,10 @@ class PacketReader {
|
||||||
if (callback != null) {
|
if (callback != null) {
|
||||||
callback.handleUnparsablePacket(message);
|
callback.handleUnparsablePacket(message);
|
||||||
}
|
}
|
||||||
|
// The parser is now at the end tag of the unparsable stanza. We need to advance to the next
|
||||||
|
// start tag in order to avoid an exception which would again lead to the execution of the
|
||||||
|
// catch block becoming effectively an endless loop.
|
||||||
|
eventType = parser.next();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
connection.processPacket(packet);
|
connection.processPacket(packet);
|
||||||
|
@ -174,6 +178,10 @@ class PacketReader {
|
||||||
if (callback != null) {
|
if (callback != null) {
|
||||||
callback.handleUnparsablePacket(message);
|
callback.handleUnparsablePacket(message);
|
||||||
}
|
}
|
||||||
|
// The parser is now at the end tag of the unparsable stanza. We need to advance to the next
|
||||||
|
// start tag in order to avoid an exception which would again lead to the execution of the
|
||||||
|
// catch block becoming effectively an endless loop.
|
||||||
|
eventType = parser.next();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
connection.processPacket(iq);
|
connection.processPacket(iq);
|
||||||
|
@ -188,6 +196,10 @@ class PacketReader {
|
||||||
if (callback != null) {
|
if (callback != null) {
|
||||||
callback.handleUnparsablePacket(message);
|
callback.handleUnparsablePacket(message);
|
||||||
}
|
}
|
||||||
|
// The parser is now at the end tag of the unparsable stanza. We need to advance to the next
|
||||||
|
// start tag in order to avoid an exception which would again lead to the execution of the
|
||||||
|
// catch block becoming effectively an endless loop.
|
||||||
|
eventType = parser.next();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
connection.processPacket(presence);
|
connection.processPacket(presence);
|
||||||
|
|
Loading…
Reference in a new issue