From b0d66211d8e700549f2a477d4499568a99eff331 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Mon, 9 Sep 2013 11:10:41 +0400 Subject: ipoe: fixed sigsegv when interface is without additional options --- accel-pppd/ctrl/ipoe/dhcpv4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'accel-pppd') diff --git a/accel-pppd/ctrl/ipoe/dhcpv4.c b/accel-pppd/ctrl/ipoe/dhcpv4.c index fa48636e..d3f00101 100644 --- a/accel-pppd/ctrl/ipoe/dhcpv4.c +++ b/accel-pppd/ctrl/ipoe/dhcpv4.c @@ -177,7 +177,7 @@ struct dhcpv4_serv *dhcpv4_create(struct triton_context_t *ctx, const char *ifna serv->hnd.read = dhcpv4_read; serv->raw_sock = raw_sock; - str0 = strchr(opt, ','); + str0 = opt ? strchr(opt, ',') : NULL; if (str0) { str0 = _strdup(str0 + 1); str = str0; -- cgit v1.2.3