Skip to content

Commit 0aab7e8

Browse files
committed
Added lower bound to Total length
1 parent 9ae9fa3 commit 0aab7e8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/platform/datapath_raw_socket.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ CxPlatDpRawParseIPv4(
300300
}
301301

302302
uint16_t IPTotalLength = CxPlatByteSwapUint16(IP->TotalLength);
303-
if (Length < IPTotalLength) {
303+
if (IPTotalLength < sizeof(IPV4_HEADER) || Length < IPTotalLength) {
304304
QuicTraceEvent(
305305
DatapathErrorStatus,
306306
"[data][%p] ERROR, %u, %s.",

0 commit comments

Comments
 (0)