diff options
author | kp <kp@FreeBSD.org> | 2015-11-01 17:20:17 +0000 |
---|---|---|
committer | kp <kp@FreeBSD.org> | 2015-11-01 17:20:17 +0000 |
commit | 412c34d24106817aa1613d30de7edba663ad708c (patch) | |
tree | 27059430c4ee1f72d940b06c4d29fb9d568e3fbd /sbin/pfctl | |
parent | 02dfa34a88fe21460dbef06a8547c14433a26b13 (diff) | |
download | FreeBSD-src-412c34d24106817aa1613d30de7edba663ad708c.zip FreeBSD-src-412c34d24106817aa1613d30de7edba663ad708c.tar.gz |
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
Diffstat (limited to 'sbin/pfctl')
-rw-r--r-- | sbin/pfctl/pfctl.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index ea0064b..43d9dc5 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)) |