mirror of
https://github.com/v2fly/v2ray-core
synced 2024-02-27 03:18:06 +00:00
fix buffer reuse bug
This commit is contained in:
committed by
Xiaokang Wang (Shelikhoo)
parent
c4f850f1a9
commit
899b8fefca
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user