1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-05 08:05:58 +01:00
Smack/smack-xmlparser-stax
Florian Schmaus ba6968fc79 [xmlparser-stax] Fix potential IAE in StaxXmlPullParser.getNamespace()
StAX's NamespaceContext.getNamespaceURI(String) is allowed to throw an
IllegalArgumentException in case the argument is null. We simply
re-use getNamespace(String) which will substitute the default
namespace if the argument is null to avoid this.

Connection closed due to an exception
java.lang.IllegalArgumentException: Illegal to pass null as argument
at com.ctc.wstx.sr.NsInputElementStack.getNamespaceURI(NsInputElementStack.java:486)
at org.jivesoftware.smack.xml.stax.StaxXmlPullParser.getNamespace(StaxXmlPullParser.java:113)
at org.jivesoftware.smack.AbstractXMPPConnection.parseFeatures(AbstractXMPPConnection.java:1852)
at org.jivesoftware.smack.AbstractXMPPConnection.parseFeaturesAndNotify(AbstractXMPPConnection.java:1887)
at org.jivesoftware.smack.tcp.XMPPTCPConnection.access$1300(XMPPTCPConnection.java:130)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:983)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$700(XMPPTCPConnection.java:913)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:936)
at java.lang.Thread.run(Thread.java:748)

Fixes SMACK-903
2021-03-03 21:41:07 +01:00
..
src [xmlparser-stax] Fix potential IAE in StaxXmlPullParser.getNamespace() 2021-03-03 21:41:07 +01:00
build.gradle Introduce test fixtures 2020-04-11 22:05:36 +02:00