mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-22 21:49:48 +00:00
Fix an edge case reshaping buffer too long
This commit is contained in:
parent
f5e71b9db7
commit
291061e9da
@ -257,7 +257,7 @@ func ReshapeMultiBuffer(ctx context.Context, buffer buf.MultiBuffer) buf.MultiBu
|
||||
for i, buffer1 := range buffer {
|
||||
if buffer1.Len() >= buf.Size-21 {
|
||||
index := int32(bytes.LastIndex(buffer1.Bytes(), TlsApplicationDataStart))
|
||||
if index <= 0 || index > buf.Size-21 {
|
||||
if index < 21 || index > buf.Size-21 {
|
||||
index = buf.Size / 2
|
||||
}
|
||||
buffer2 := buf.New()
|
||||
|
Loading…
Reference in New Issue
Block a user