From: Roy Marples Date: Mon, 15 Feb 2016 17:43:59 +0000 (+0000) Subject: Check we have arg before accessing it's parsed iaid. Fixes [005c389f71]. X-Git-Tag: v6.10.2~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee184a69d1f46327f8ef76910f01030609ebcab8;p=thirdparty%2Fdhcpcd.git Check we have arg before accessing it's parsed iaid. Fixes [005c389f71]. --- diff --git a/if-options.c b/if-options.c index 57362f9d..88148837 100644 --- a/if-options.c +++ b/if-options.c @@ -1342,7 +1342,7 @@ parse_option(struct dhcpcd_ctx *ctx, const char *ifname, struct if_options *ifo, ia = NULL; for (sl = 0; sl < ifo->ia_len; sl++) { if ((arg == NULL && !ifo->ia[sl].iaid_set) || - (ifo->ia[sl].iaid_set && + (arg != NULL && ifo->ia[sl].iaid_set && ifo->ia[sl].iaid[0] == iaid[0] && ifo->ia[sl].iaid[1] == iaid[1] && ifo->ia[sl].iaid[2] == iaid[2] &&