handle null boolean value (legal, but not in this context), fixes bug reported by nickster

This commit is contained in:
jrandom
2004-06-13 19:32:58 +00:00
committed by zzz
parent da8341d014
commit 878af163a9

View File

@ -84,7 +84,10 @@ public class DatabaseLookupMessage extends I2NPMessageImpl {
_key.readBytes(in); _key.readBytes(in);
_from = new RouterInfo(); _from = new RouterInfo();
_from.readBytes(in); _from.readBytes(in);
boolean tunnelSpecified = DataHelper.readBoolean(in).booleanValue(); Boolean val = DataHelper.readBoolean(in);
if (val == null)
throw new I2NPMessageException("Tunnel must be explicitly specified (or not)");
boolean tunnelSpecified = val.booleanValue();
if (tunnelSpecified) { if (tunnelSpecified) {
_replyTunnel = new TunnelId(); _replyTunnel = new TunnelId();
_replyTunnel.readBytes(in); _replyTunnel.readBytes(in);