fix nil pointer dereference in yggdrasil.Conn.search

This commit is contained in:
Arceliar 2019-10-06 11:53:14 -05:00
parent 7f8dfe84cf
commit a1c413f769

View File

@ -115,13 +115,13 @@ func (c *Conn) search() error {
default:
if sinfo != nil {
// Finish initializing the session
sinfo.setConn(nil, c)
}
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)
}