From: svimik Date: Thu, 29 Sep 2011 11:41:34 +0000 (+0200) Subject: Fix segfault when enabling pf plug-ins X-Git-Tag: v2.4_alpha1~570 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31e5f34f3c6cf3aa6f120d22c415ac74a5ba1639;p=thirdparty%2Fopenvpn.git Fix segfault when enabling pf plug-ins This fixes an issue where a segfault happens in pf_cn_test() if no packet filtering rules have been parsed. See the trac ticket for more details. Trac: 163 Signed-off-by: David Sommerseth Acked-by: David Sommerseth --- diff --git a/src/openvpn/pf.c b/src/openvpn/pf.c index aafe9ff09..461beed75 100644 --- a/src/openvpn/pf.c +++ b/src/openvpn/pf.c @@ -417,7 +417,7 @@ lookup_cn_rule (struct hash *h, const char *cn, const uint32_t cn_hash) bool pf_cn_test (struct pf_set *pfs, const struct tls_multi *tm, const int type, const char *prefix) { - if (!pfs->kill) + if (pfs && !pfs->kill) { const char *cn; uint32_t cn_hash;