From 3e768368d01a69c40caf0262d08605b83a7f3130 Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Sun, 1 Nov 2015 17:20:17 +0000 Subject: [PATCH] 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(+) diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index ea0064b02b7e..43d9dc56a8ed 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -1840,6 +1840,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))