From: Roy Marples Date: Mon, 28 Jan 2013 09:54:51 +0000 (+0000) Subject: Fix potential issue if we don't want routes and we fail a decode. X-Git-Tag: v5.99.6~84 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1a59b377b556aaccc9470cac50c954d565c62be4;p=thirdparty%2Fdhcpcd.git Fix potential issue if we don't want routes and we fail a decode. --- diff --git a/dhcp.c b/dhcp.c index 5c719987..385bfb44 100644 --- a/dhcp.c +++ b/dhcp.c @@ -784,6 +784,8 @@ get_option_routes(struct interface *ifp, const struct dhcp_message *dhcp) /* OK, get our static routes first. */ if (!has_option_mask(ifo->nomask, DHO_STATICROUTE)) p = get_option(dhcp, DHO_STATICROUTE, &len, NULL); + else + p = NULL; if (p) { e = p + len; while (p < e) {