]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Check we have arg before accessing it's parsed iaid. Fixes [005c389f71].
authorRoy Marples <roy@marples.name>
Mon, 15 Feb 2016 17:43:59 +0000 (17:43 +0000)
committerRoy Marples <roy@marples.name>
Mon, 15 Feb 2016 17:43:59 +0000 (17:43 +0000)
if-options.c

index 57362f9dee544d93f36c19c8c42b813429229f9c..881488374975de79eff38c4072b3eb538d440f20 100644 (file)
@@ -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] &&