From 1644126f30705b10caa005675007885e2ab99f1d Mon Sep 17 00:00:00 2001 From: Nick Banks Date: Wed, 25 Sep 2024 14:16:29 -0400 Subject: [PATCH] Zero out memory from PacketNumber in QuicBindingPreprocessPacket (#4560) --- src/core/binding.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/binding.c b/src/core/binding.c index d8f77fdd5f..244dc5a573 100644 --- a/src/core/binding.c +++ b/src/core/binding.c @@ -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;