diff options
author | Vladislav Grishenko <themiron@mail.ru> | 2021-03-20 18:25:15 +0500 |
---|---|---|
committer | Vladislav Grishenko <themiron@mail.ru> | 2021-03-20 18:25:15 +0500 |
commit | 5c6cf3e627b95a76ccdd21b956a9e77f05f250d9 (patch) | |
tree | eaea5e00f4bbe70dc2f426404fba970c40487f53 /accel-pppd/ipv6/nd.c | |
parent | 21830c460aaccef7fee6fbfb1795bb34b53bb01d (diff) | |
download | accel-ppp-5c6cf3e627b95a76ccdd21b956a9e77f05f250d9.tar.gz accel-ppp-5c6cf3e627b95a76ccdd21b956a9e77f05f250d9.zip |
ipv6, shaper: fix possible NULL-pointer dereference
Diffstat (limited to 'accel-pppd/ipv6/nd.c')
-rw-r--r-- | accel-pppd/ipv6/nd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/accel-pppd/ipv6/nd.c b/accel-pppd/ipv6/nd.c index 4dd9d5a7..a4233b52 100644 --- a/accel-pppd/ipv6/nd.c +++ b/accel-pppd/ipv6/nd.c @@ -414,6 +414,9 @@ static void add_dnssl(const char *val) const char *ptr; uint8_t *buf; + if (!val) + return; + if (val[n - 1] == '.') n++; else @@ -474,7 +477,8 @@ static void load_dns(void) } if (!strcmp(opt->name, "lifetime")) { - conf_rdnss_lifetime = atoi(opt->val); + if (opt->val) + conf_rdnss_lifetime = atoi(opt->val); continue; } |