diff options
author | Rob Ekl <ekl.rob@gmail.com> | 2022-10-14 11:50:43 -0500 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2022-10-15 13:09:22 +0200 |
commit | 4a673e1cd26d58ebf4397dd06ee5fa39f7f832da (patch) | |
tree | affd55f7db355aeaf432c9928391ea09bd0fa70e | |
parent | 860ca900e41c5d0f98cc85e67b39977f6f2cb355 (diff) |
fix null pointer dereference for INFORM messages
-rw-r--r-- | src/dhcpv4.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dhcpv4.c b/src/dhcpv4.c index f078087..7ac7af9 100644 --- a/src/dhcpv4.c +++ b/src/dhcpv4.c @@ -849,7 +849,7 @@ void dhcpv4_handle_msg(void *addr, void *data, size_t len, dhcpv4_put(&reply, &cookie, DHCPV4_OPT_DNSSERVER, 4 * iface->dhcpv4_dns_cnt, iface->dhcpv4_dns); - if (a->reqopts && iface->dhcpv4_ntp_cnt != 0) { + if (a && a->reqopts && iface->dhcpv4_ntp_cnt != 0) { for(size_t opts = 0; a->reqopts[opts]; opts++) { if (a->reqopts[opts] == DHCPV4_OPT_NTPSERVER) { dhcpv4_put(&reply, &cookie, DHCPV4_OPT_NTPSERVER, |