mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
fix leftover use of Header.GetLength when unpacking packets
This commit is contained in:
parent
bd22b0b630
commit
f711dfab2b
1 changed files with 1 additions and 1 deletions
|
@ -159,7 +159,7 @@ func (u *packetUnpacker) unpack(hd headerDecryptor, hdr *wire.Header, data []byt
|
|||
}
|
||||
// 4. if the packet number is shorter than 4 bytes, replace the remaining bytes with the copy we saved earlier
|
||||
if extHdr.PacketNumberLen != protocol.PacketNumberLen4 {
|
||||
copy(data[extHdr.GetLength(u.version):hdrLen+4], origPNBytes[int(extHdr.PacketNumberLen):])
|
||||
copy(data[extHdr.ParsedLen():hdrLen+4], origPNBytes[int(extHdr.PacketNumberLen):])
|
||||
}
|
||||
|
||||
extHdr.PacketNumber = protocol.DecodePacketNumber(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue