I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 665b6917 authored by zzz's avatar zzz
Browse files

UPnP: Prevent NPE after ParserException

parent 87953c4b
No related branches found
No related tags found
No related merge requests found
...@@ -174,6 +174,10 @@ public class NotifyRequest extends SOAPRequest ...@@ -174,6 +174,10 @@ public class NotifyRequest extends SOAPRequest
public PropertyList getPropertyList() { public PropertyList getPropertyList() {
PropertyList properties = new PropertyList(); PropertyList properties = new PropertyList();
Node varSetNode = getEnvelopeNode(); Node varSetNode = getEnvelopeNode();
// I2P change: ParserException caught in getRootNode() causes
// getEnvelopeNode() to return null
if (varSetNode == null)
return properties;
for (int i = 0; i<varSetNode.getNNodes(); i++){ for (int i = 0; i<varSetNode.getNNodes(); i++){
Node propNode = varSetNode.getNode(i); Node propNode = varSetNode.getNode(i);
if (propNode == null) if (propNode == null)
...@@ -184,4 +188,4 @@ public class NotifyRequest extends SOAPRequest ...@@ -184,4 +188,4 @@ public class NotifyRequest extends SOAPRequest
return properties; return properties;
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment