mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 20:57:36 +03:00
use in-place decryption when opening packets
This commit is contained in:
parent
e3d2c81729
commit
413844d0bc
1 changed files with 1 additions and 5 deletions
|
@ -93,11 +93,7 @@ func (u *packetUnpacker) Unpack(hdr *wire.Header, data []byte) (*unpackedPacket,
|
|||
extHdr.PacketNumber,
|
||||
)
|
||||
|
||||
buf := *getPacketBuffer()
|
||||
buf = buf[:0]
|
||||
defer putPacketBuffer(&buf)
|
||||
|
||||
decrypted, err := opener.Open(buf, data, pn, extHdr.Raw)
|
||||
decrypted, err := opener.Open(data[:0], data, pn, extHdr.Raw)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue