Author: kp
Date: Sun Nov  1 17:20:17 2015
New Revision: 290236
URL: https://svnweb.freebsd.org/changeset/base/290236

Log:
  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

Modified:
  head/sbin/pfctl/pfctl.c

Modified: head/sbin/pfctl/pfctl.c
==============================================================================
--- head/sbin/pfctl/pfctl.c     Sun Nov  1 16:59:28 2015        (r290235)
+++ head/sbin/pfctl/pfctl.c     Sun Nov  1 17:20:17 2015        (r290236)
@@ -1840,6 +1840,7 @@ pfctl_set_debug(struct pfctl *pf, char *
        }
 
        pf->debug_set = 1;
+       level = pf->debug;
 
        if ((pf->opts & PF_OPT_NOACTION) == 0)
                if (ioctl(dev, DIOCSETDEBUG, &level))
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to