mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-22 11:23:32 +02:00
Fix an edge case reshaping buffer too long
This commit is contained in:
parent
f5e71b9db7
commit
291061e9da
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue