mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 11:15:07 +03:00 
			
		
		
		
	fix nil pointer dereference in yggdrasil.Conn.search
This commit is contained in:
		
							parent
							
								
									7f8dfe84cf
								
							
						
					
					
						commit
						a1c413f769
					
				
					 1 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
					@ -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)
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue