From adcf3b97577c180099c15b9438d7c7feb881b8bf Mon Sep 17 00:00:00 2001 From: kp Date: Tue, 15 Dec 2015 21:02:53 +0000 Subject: [PATCH] MFC r290236 pfctl: Fix uninitialised veriable In pfctl_set_debug() we used 'level' without ever initialising it. We correctly parsed the option, but them failed to actually assign the parsed value to 'level' before performing to ioctl() to configure the debug level. PR: 202996 Submitted by: Andrej Kolontai git-svn-id: svn://svn.freebsd.org/base/stable/10@292288 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sbin/pfctl/pfctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 64b4a0519..f8802b364 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1845,6 +1845,7 @@ pfctl_set_debug(struct pfctl *pf, char *d) } pf->debug_set = 1; + level = pf->debug; if ((pf->opts & PF_OPT_NOACTION) == 0) if (ioctl(dev, DIOCSETDEBUG, &level)) -- 2.45.0