* i2psnark: Fix OOM vulnerability by checking incoming message length

(thanks devzero!)
This commit is contained in:
zzz
2008-08-13 15:59:16 +00:00
parent 719ba3f66f
commit 49af13a3ca
4 changed files with 10 additions and 3 deletions

View File

@ -62,7 +62,7 @@ class PeerState
private final static int MAX_PIPELINE = 2; // this is for outbound requests
private final static int MAX_PIPELINE_BYTES = 128*1024; // this is for inbound requests
private final static int PARTSIZE = 32*1024; // Snark was 16K, i2p-bt uses 64KB
public final static int PARTSIZE = 32*1024; // Snark was 16K, i2p-bt uses 64KB
private final static int MAX_PARTSIZE = 64*1024; // Don't let anybody request more than this
PeerState(Peer peer, PeerListener listener, MetaInfo metainfo,