fix rare NPE

This commit is contained in:
zzz
2009-01-13 19:28:09 +00:00
parent 8296723533
commit bdcb625e6d

View File

@ -530,6 +530,8 @@ public class Packet {
public boolean verifySignature(I2PAppContext ctx, Destination from, byte buffer[]) {
if (!isFlagSet(FLAG_SIGNATURE_INCLUDED)) return false;
if (_optionSignature == null) return false;
// prevent receiveNewSyn() ... !active ... sendReset() ... verifySignature ... NPE
if (from == null) return false;
int size = writtenSize();