mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-08-22 09:36:49 +08:00
Fix 1/67000000 chance's server panic; Refine comments
https://github.com/XTLS/Xray-core/pull/4952#issuecomment-3188118918
This commit is contained in:
@@ -47,7 +47,7 @@ func DecodeHeader(h []byte) (t byte, l int, err error) {
|
||||
l = 0
|
||||
}
|
||||
if l < 17 || l > 17000 { // TODO: TLSv1.3 max length
|
||||
err = errors.New("invalid header: ", fmt.Sprintf("%v", h[:5])) // relied by client's Read()
|
||||
err = errors.New("invalid header: ", fmt.Sprintf("%v", h[:5])) // DO NOT CHANGE: relied by client's Read()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user