Skip to content

Commit

Permalink
Zero out memory from PacketNumber in QuicBindingPreprocessPacket (#4560)
Browse files Browse the repository at this point in the history
  • Loading branch information
nibanks committed Sep 25, 2024
1 parent ee4a1bc commit e0201eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/binding.c
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,9 @@ QuicBindingPreprocessPacket(
_Out_ BOOLEAN* ReleaseDatagram
)
{
CxPlatZeroMemory(&Packet->PacketNumber, sizeof(QUIC_RX_PACKET) - sizeof(uint64_t));
CxPlatZeroMemory( // Zero out everything from PacketNumber forward
&Packet->PacketNumber,
sizeof(QUIC_RX_PACKET) - offsetof(QUIC_RX_PACKET, PacketNumber));
Packet->AvailBuffer = Packet->Buffer;
Packet->AvailBufferLength = Packet->BufferLength;

Expand Down

0 comments on commit e0201eb

Please sign in to comment.