Skip to content

Commit 38fe8fd

Browse files
committed
read udp after the test that validates the length
1 parent 0aab7e8 commit 38fe8fd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/platform/datapath_raw_socket.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ CxPlatDpRawParseUdp(
157157
_In_ uint16_t Length
158158
)
159159
{
160-
const uint16_t UdpLength = QuicNetByteSwapShort(Udp->Length);
161-
162160
if (Length < sizeof(UDP_HEADER)) {
163161
QuicTraceEvent(
164162
DatapathErrorStatus,
@@ -169,6 +167,8 @@ CxPlatDpRawParseUdp(
169167
return;
170168
}
171169

170+
const uint16_t UdpLength = QuicNetByteSwapShort(Udp->Length);
171+
172172
if (Length < UdpLength) {
173173
QuicTraceEvent(
174174
DatapathErrorStatus,

0 commit comments

Comments
 (0)