From 56a48101dc3dd96587915a5d7882f9d46ecc6ae9 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 23 Mar 2015 15:08:29 +0100 Subject: cmd/rlpdump, cmd/utils, eth, p2p, whisper: use rlp input limit --- eth/protocol.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'eth') diff --git a/eth/protocol.go b/eth/protocol.go index 1a19307db..6b566f31b 100644 --- a/eth/protocol.go +++ b/eth/protocol.go @@ -210,7 +210,7 @@ func (self *ethProtocol) handle() error { return p2p.Send(self.rw, BlockHashesMsg, hashes) case BlockHashesMsg: - msgStream := rlp.NewStream(msg.Payload) + msgStream := rlp.NewStream(msg.Payload, uint64(msg.Size)) if _, err := msgStream.List(); err != nil { return err } @@ -231,7 +231,7 @@ func (self *ethProtocol) handle() error { self.blockPool.AddBlockHashes(iter, self.id) case GetBlocksMsg: - msgStream := rlp.NewStream(msg.Payload) + msgStream := rlp.NewStream(msg.Payload, uint64(msg.Size)) if _, err := msgStream.List(); err != nil { return err } @@ -259,7 +259,7 @@ func (self *ethProtocol) handle() error { return p2p.Send(self.rw, BlocksMsg, blocks) case BlocksMsg: - msgStream := rlp.NewStream(msg.Payload) + msgStream := rlp.NewStream(msg.Payload, uint64(msg.Size)) if _, err := msgStream.List(); err != nil { return err } -- cgit v1.2.3