Skip to content

Commit

Permalink
Merge branch 'ethereum:master' into portal
Browse files Browse the repository at this point in the history
  • Loading branch information
GrapeBaBa authored Jun 22, 2024
2 parents 1189e67 + a71f6f9 commit 0f8632e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion p2p/discover/table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func waitForRevalidationPing(t *testing.T, transport *pingRecorder, tab *Table,
simclock.Run(tab.cfg.PingInterval * slowRevalidationFactor)
p := transport.waitPing(2 * time.Second)
if p == nil {
t.Fatal("Table did not send revalidation ping")
continue
}
if id == (enode.ID{}) || p.ID() == id {
return p
Expand Down
5 changes: 5 additions & 0 deletions p2p/rlpx/rlpx.go
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,11 @@ func (h *handshakeState) readMsg(msg interface{}, prv *ecdsa.PrivateKey, r io.Re
}
size := binary.BigEndian.Uint16(prefix)

// baseProtocolMaxMsgSize = 2 * 1024
if size > 2048 {
return nil, errors.New("message too big")
}

// Read the handshake packet.
packet, err := h.rbuf.read(r, int(size))
if err != nil {
Expand Down

0 comments on commit 0f8632e

Please sign in to comment.