From 0696c87609cb06af71377db0d481f43e7bd039c2 Mon Sep 17 00:00:00 2001 From: kp Date: Tue, 15 Dec 2015 21:02:53 +0000 Subject: 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 --- sbin/pfctl/pfctl.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sbin') diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index 64b4a05..f8802b3 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)) -- cgit v1.1