mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-22 16:30:27 +00:00
fix nil pointer dereference in yggdrasil.Conn.search
This commit is contained in:
parent
7f8dfe84cf
commit
a1c413f769
@ -115,12 +115,12 @@ func (c *Conn) search() error {
|
||||
default:
|
||||
if sinfo != nil {
|
||||
// Finish initializing the session
|
||||
sinfo.setConn(nil, c)
|
||||
}
|
||||
c.session = sinfo
|
||||
c.nodeID = crypto.GetNodeID(&c.session.theirPermPub)
|
||||
for i := range c.nodeMask {
|
||||
c.nodeMask[i] = 0xFF
|
||||
c.session = sinfo
|
||||
c.session.setConn(nil, c)
|
||||
c.nodeID = crypto.GetNodeID(&c.session.theirPermPub)
|
||||
for i := range c.nodeMask {
|
||||
c.nodeMask[i] = 0xFF
|
||||
}
|
||||
}
|
||||
err = e
|
||||
close(done)
|
||||
|
Loading…
Reference in New Issue
Block a user