mirror of
https://github.com/status-im/whisper.git
synced 2025-02-24 00:18:12 +00:00
cmd/rlpdump, cmd/utils, eth, p2p, whisper: use rlp input limit
This commit is contained in:
parent
ede795bf61
commit
a97346b484
2
peer.go
2
peer.go
@ -66,7 +66,7 @@ func (self *peer) handshake() error {
|
|||||||
if packet.Code != statusCode {
|
if packet.Code != statusCode {
|
||||||
return fmt.Errorf("peer sent %x before status packet", packet.Code)
|
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 {
|
if _, err := s.List(); err != nil {
|
||||||
return fmt.Errorf("bad status message: %v", err)
|
return fmt.Errorf("bad status message: %v", err)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user