mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-02-26 16:57:08 +00:00
fix: handle nil pointer stored in non-nil interface (#2337)
This commit is contained in:
@@ -252,13 +252,14 @@ func (spc *ssrPacketConn) WaitReadFrom() (data []byte, put func(), addr net.Addr
|
||||
return nil, nil, nil, errors.New("parse addr error")
|
||||
}
|
||||
|
||||
addr = _addr.UDPAddr()
|
||||
if addr == nil {
|
||||
udpAddr := _addr.UDPAddr()
|
||||
if udpAddr == nil {
|
||||
if put != nil {
|
||||
put()
|
||||
}
|
||||
return nil, nil, nil, errors.New("parse addr error")
|
||||
}
|
||||
addr = udpAddr
|
||||
|
||||
data = data[len(_addr):]
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user