summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accel-pppd/ipv6/dhcpv6.c3
-rw-r--r--accel-pppd/ipv6/nd.c6
-rw-r--r--accel-pppd/shaper/shaper.c3
3 files changed, 11 insertions, 1 deletions
diff --git a/accel-pppd/ipv6/dhcpv6.c b/accel-pppd/ipv6/dhcpv6.c
index a48d7a1d..471e0a0a 100644
--- a/accel-pppd/ipv6/dhcpv6.c
+++ b/accel-pppd/ipv6/dhcpv6.c
@@ -826,6 +826,9 @@ static void add_dnssl(const char *val)
const char *ptr;
uint8_t *buf;
+ if (!val)
+ return;
+
if (val[n - 1] == '.')
n++;
else
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;
}
diff --git a/accel-pppd/shaper/shaper.c b/accel-pppd/shaper/shaper.c
index 351a7ee1..69555318 100644
--- a/accel-pppd/shaper/shaper.c
+++ b/accel-pppd/shaper/shaper.c
@@ -903,6 +903,9 @@ static struct time_range_t *parse_range(time_t t, const char *val)
struct tm begin_tm, end_tm;
struct time_range_t *r;
+ if (!val)
+ return NULL;
+
id = strtol(val, &endptr, 10);
if (*endptr != ',')
return NULL;