Date: Mon, 22 Sep 2014 16:45:28 +0000 (UTC) From: Cy Schubert <cy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271980 - head/sys/contrib/ipfilter/netinet Message-ID: <201409221645.s8MGjSgp091403@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cy Date: Mon Sep 22 16:45:28 2014 New Revision: 271980 URL: http://svnweb.freebsd.org/changeset/base/271980 Log: 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-> Approved by: glebius (mentor) Obtained from: NetBSD CVS repo (r1.5) Modified: head/sys/contrib/ipfilter/netinet/ip_dstlist.c Modified: head/sys/contrib/ipfilter/netinet/ip_dstlist.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_dstlist.c Mon Sep 22 16:37:37 2014 (r271979) +++ head/sys/contrib/ipfilter/netinet/ip_dstlist.c Mon Sep 22 16:45:28 2014 (r271980) @@ -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?201409221645.s8MGjSgp091403>