Date: Sun, 12 Oct 2014 17:08:45 +0000 (UTC) From: Cy Schubert <cy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272992 - stable/10/sys/contrib/ipfilter/netinet Message-ID: <201410121708.s9CH8jqw058785@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cy Date: Sun Oct 12 17:08:44 2014 New Revision: 272992 URL: https://svnweb.freebsd.org/changeset/base/272992 Log: MFC r271980 Check for NULL before de-refencing; in particular sel is assigned to NULL, in the default case, and then couple of lines down we do sel-> Obtained from: NetBSD CVS repo (r1.5) Modified: stable/10/sys/contrib/ipfilter/netinet/ip_dstlist.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/contrib/ipfilter/netinet/ip_dstlist.c ============================================================================== --- stable/10/sys/contrib/ipfilter/netinet/ip_dstlist.c Sun Oct 12 17:07:15 2014 (r272991) +++ stable/10/sys/contrib/ipfilter/netinet/ip_dstlist.c Sun Oct 12 17:08:44 2014 (r272992) @@ -1134,7 +1134,7 @@ ipf_dstlist_select(fin, d) int family; int x; - if (d->ipld_dests == NULL || *d->ipld_dests == NULL) + if (d == NULL || d->ipld_dests == NULL || *d->ipld_dests == NULL) return NULL; family = fin->fin_family; @@ -1222,7 +1222,7 @@ ipf_dstlist_select(fin, d) break; } - if (sel->ipfd_dest.fd_addr.adf_family != family) + if (sel && sel->ipfd_dest.fd_addr.adf_family != family) sel = NULL; d->ipld_selected = sel;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410121708.s9CH8jqw058785>