1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-20 06:25:24 +00:00

fix buffer reuse bug

This commit is contained in:
Shelikhoo 2021-12-29 22:29:07 +00:00 committed by Xiaokang Wang (Shelikhoo)
parent c4f850f1a9
commit 899b8fefca

View File

@ -24,8 +24,9 @@ func AttachAddressToPacket(data []byte, address gonet.Addr) []byte {
if err != nil {
panic(err)
}
//Incorrect buffer reuse
data = append(packetBuf.Bytes(), data...)
packetBuf.Release()
//packetBuf.Release()
return data
}