svn commit: r271980 - head/sys/contrib/ipfilter/netinet
Cy Schubert
cy at FreeBSD.org
Mon Sep 22 16:45:29 UTC 2014
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;
More information about the svn-src-head
mailing list