Fix 1/67000000 chance's server panic; Refine comments

https://github.com/XTLS/Xray-core/pull/4952#issuecomment-3188118918
This commit is contained in:
RPRX
2025-08-14 15:28:40 +00:00
committed by GitHub
parent 2807ee432a
commit bfe4820f2f
4 changed files with 22 additions and 18 deletions

View File

@@ -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
}