mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-22 11:23:32 +02:00
Fix an edge case with tls hello fragment
This commit is contained in:
parent
e64fb3ca9b
commit
548646fb06
1 changed files with 3 additions and 0 deletions
|
@ -373,6 +373,9 @@ func (f *FragmentWriter) Write(b []byte) (int, error) {
|
|||
return f.writer.Write(b)
|
||||
}
|
||||
recordLen := 5 + ((int(b[3]) << 8) | int(b[4]))
|
||||
if len(b) < recordLen { // maybe already fragmented somehow
|
||||
return f.writer.Write(b)
|
||||
}
|
||||
data := b[5:recordLen]
|
||||
buf := make([]byte, 1024)
|
||||
for from := 0; ; {
|
||||
|
|
Loading…
Reference in a new issue