svn commit: r272992 - stable/10/sys/contrib/ipfilter/netinet

Cy Schubert cy at FreeBSD.org
Sun Oct 12 17:08:45 UTC 2014


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;
 


More information about the svn-src-stable mailing list