From: Roy Marples Date: Tue, 14 Jan 2014 10:56:21 +0000 (+0000) Subject: Fix CID: 1153964 and 1153966 X-Git-Tag: v6.2.1~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=563a421c507f9ac8cf781cfd41ee52c4601051fd;p=thirdparty%2Fdhcpcd.git Fix CID: 1153964 and 1153966 --- diff --git a/dhcp6.c b/dhcp6.c index 46248eb8..c86cf277 100644 --- a/dhcp6.c +++ b/dhcp6.c @@ -431,6 +431,10 @@ dhcp6_makemessage(struct interface *ifp) ml = state->new_len; } si = dhcp6_getmoption(D6_OPTION_SERVERID, m, ml); + if (si == NULL) { + errno = ESRCH; + return -1; + } len += sizeof(*si) + ntohs(si->len); /* FALLTHROUGH */ case DH6S_REBIND: diff --git a/if-options.c b/if-options.c index 770245e5..fc35f763 100644 --- a/if-options.c +++ b/if-options.c @@ -1083,6 +1083,7 @@ parse_option(struct if_options *ifo, int opt, const char *arg) if (parse_iaid(ifo->iaid, arg, sizeof(ifo->iaid)) == -1) return -1; ifo->options |= DHCPCD_IAID; + break; case O_IPV6RS: ifo->options |= DHCPCD_IPV6RS; break;