cmd/rlpdump, cmd/utils, eth, p2p, whisper: use rlp input limit

This commit is contained in:
Felix Lange 2015-03-23 15:08:29 +01:00
parent ede795bf61
commit a97346b484

View File

@ -66,7 +66,7 @@ func (self *peer) handshake() error {
if packet.Code != statusCode {
return fmt.Errorf("peer sent %x before status packet", packet.Code)
}
s := rlp.NewStream(packet.Payload)
s := rlp.NewStream(packet.Payload, uint64(packet.Size))
if _, err := s.List(); err != nil {
return fmt.Errorf("bad status message: %v", err)
}