mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-13 10:45:51 +00:00
Fix Integer overflow in BitcoinSerializer.BitcoinPacketHeader
This commit is contained in:
parent
0ebdd5bbea
commit
9b2ad15cd3
@ -367,7 +367,7 @@ public class BitcoinSerializer extends MessageSerializer {
|
|||||||
size = (int) readUint32(header, cursor);
|
size = (int) readUint32(header, cursor);
|
||||||
cursor += 4;
|
cursor += 4;
|
||||||
|
|
||||||
if (size > Message.MAX_SIZE)
|
if (size > Message.MAX_SIZE || size < 0)
|
||||||
throw new ProtocolException("Message size too large: " + size);
|
throw new ProtocolException("Message size too large: " + size);
|
||||||
|
|
||||||
// Old clients don't send the checksum.
|
// Old clients don't send the checksum.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user