diff options
Diffstat (limited to 'gdhcp')
-rw-r--r-- | gdhcp/client.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdhcp/client.c b/gdhcp/client.c index 3d27b4a0..b9f8da61 100644 --- a/gdhcp/client.c +++ b/gdhcp/client.c @@ -1596,6 +1596,9 @@ static GList *get_addresses(GDHCPClient *dhcp_client, uint8_t *option; char *str; + if (value == NULL || len < 4) + return NULL; + iaid = get_uint32(&value[0]); if (dhcp_client->iaid != iaid) return NULL; @@ -1700,6 +1703,9 @@ static GList *get_dhcpv6_option_value_list(GDHCPClient *dhcp_client, char *str; int i; + if (value == NULL) + return NULL; + switch (code) { case G_DHCPV6_DNS_SERVERS: /* RFC 3646, chapter 3 */ case G_DHCPV6_SNTP_SERVERS: /* RFC 4075, chapter 4 */ |