libsystemd-network: add assert about packet length

We reject too-short packets in client_receive_message_raw(), so
the packets that dhcp_packet_verify_headers() gets are of sufficient size.
But let's add an assert to clarify this for the reader.

Closes #23223.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2022-04-29 15:55:59 +02:00
parent 9a94baa6c7
commit 6f1b4574b4

View File

@@ -129,6 +129,7 @@ int dhcp_packet_verify_headers(DHCPPacket *packet, size_t len, bool checksum, ui
size_t hdrlen;
assert(packet);
assert(len >= sizeof(DHCPPacket));
/* IP */