summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/test-dhcp-option.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd-network/test-dhcp-option.c')
-rw-r--r--src/libsystemd-network/test-dhcp-option.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsystemd-network/test-dhcp-option.c b/src/libsystemd-network/test-dhcp-option.c
index 6062a37dab..bd448ff2b2 100644
--- a/src/libsystemd-network/test-dhcp-option.c
+++ b/src/libsystemd-network/test-dhcp-option.c
@@ -130,6 +130,8 @@ static DHCPMessage *create_message(uint8_t *options, uint16_t optlen,
static void test_ignore_opts(uint8_t *descoption, int *descpos, int *desclen)
{
+ assert(*descpos >= 0);
+
while (*descpos < *desclen) {
switch(descoption[*descpos]) {
case DHCP_OPTION_PAD: