Skip to content

Commit b548b5a

Browse files
authored
p2p/discover: fix crash in Resolve (#19579)
1 parent 4b9c3bd commit b548b5a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎p2p/discover/v4_udp.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -426,11 +426,11 @@ func (t *UDPv4) Resolve(n *enode.Node) *enode.Node {
426426
}
427427
}
428428
// Otherwise perform a network lookup.
429-
var key *enode.Secp256k1
430-
if n.Load(key) != nil {
429+
var key enode.Secp256k1
430+
if n.Load(&key) != nil {
431431
return n // no secp256k1 key
432432
}
433-
result := t.LookupPubkey((*ecdsa.PublicKey)(key))
433+
result := t.LookupPubkey((*ecdsa.PublicKey)(&key))
434434
for _, rn := range result {
435435
if rn.ID() == n.ID() {
436436
if rn, err := t.requestENR(rn); err == nil {

0 commit comments

Comments
 (0)