5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-14 04:30:32 +00:00

Merge pull request #570 from Arceliar/bugfix

fix nil pointer dereference in yggdrasil.Conn.search
This commit is contained in:
Arceliar 2019-10-06 11:59:15 -05:00 committed by GitHub
commit 5ae1503c5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -115,13 +115,13 @@ func (c *Conn) search() error {
default: default:
if sinfo != nil { if sinfo != nil {
// Finish initializing the session // Finish initializing the session
sinfo.setConn(nil, c)
}
c.session = sinfo c.session = sinfo
c.session.setConn(nil, c)
c.nodeID = crypto.GetNodeID(&c.session.theirPermPub) c.nodeID = crypto.GetNodeID(&c.session.theirPermPub)
for i := range c.nodeMask { for i := range c.nodeMask {
c.nodeMask[i] = 0xFF c.nodeMask[i] = 0xFF
} }
}
err = e err = e
close(done) close(done)
} }