mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-22 23:13:01 +00:00
Fix an edge case with tls hello fragment
This commit is contained in:
parent
e64fb3ca9b
commit
548646fb06
@ -373,6 +373,9 @@ func (f *FragmentWriter) Write(b []byte) (int, error) {
|
|||||||
return f.writer.Write(b)
|
return f.writer.Write(b)
|
||||||
}
|
}
|
||||||
recordLen := 5 + ((int(b[3]) << 8) | int(b[4]))
|
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]
|
data := b[5:recordLen]
|
||||||
buf := make([]byte, 1024)
|
buf := make([]byte, 1024)
|
||||||
for from := 0; ; {
|
for from := 0; ; {
|
||||||
|
Loading…
Reference in New Issue
Block a user