UPnP: Fix NPE in HTML output on /peers (ticket #1779)

This commit is contained in:
zzz
2016-03-12 13:55:03 +00:00
parent dc36de667d
commit 2e3f5d0de9
2 changed files with 5 additions and 2 deletions

View File

@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 10;
public final static long BUILD = 11;
/** for example "-test" */
public final static String EXTRA = "-rc";

View File

@ -544,7 +544,10 @@ class UPnP extends ControlPoint implements DeviceChangeListener, EventListener {
_lastService = serv;
_lastArgumentList = getIP.getOutputArgumentList();
}
String rv = _lastArgumentList.getArgument(arg).getValue();
Argument a = _lastArgumentList.getArgument(arg);
if (a == null)
return "";
String rv = a.getValue();
return DataHelper.escapeHTML(rv);
}
}