summaryrefslogtreecommitdiff
path: root/gdhcp
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2012-05-10 13:31:58 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-05-11 07:19:42 (GMT)
commit99cf044b1796c0698e58d6bb1f1647521a029e8e (patch)
tree011d7530ac5cfe7fe2b9e6aac1530a1b68bc8c42 /gdhcp
parenta7232d6f304455e2388279b4462de42f789f7b9d (diff)
downloadconnman-99cf044b1796c0698e58d6bb1f1647521a029e8e.zip
connman-99cf044b1796c0698e58d6bb1f1647521a029e8e.tar.gz
connman-99cf044b1796c0698e58d6bb1f1647521a029e8e.tar.bz2
gdhcp: Make sure we have the message before accessing it
Diffstat (limited to 'gdhcp')
-rw-r--r--gdhcp/client.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdhcp/client.c b/gdhcp/client.c
index a51857f..ec1b2a2 100644
--- a/gdhcp/client.c
+++ b/gdhcp/client.c
@@ -1865,6 +1865,9 @@ static gboolean listener_event(GIOChannel *channel, GIOCondition condition,
return TRUE;
if (dhcp_client->type == G_DHCP_IPV6) {
+ if (packet6 == NULL)
+ return TRUE;
+
count = 0;
client_id = dhcpv6_get_option(packet6, pkt_len,
G_DHCPV6_CLIENTID, &option_len, &count);