Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Dec 2015 21:02:54 +0000 (UTC)
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r292288 - stable/10/sbin/pfctl
Message-ID:  <201512152102.tBFL2s4g087468@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kp
Date: Tue Dec 15 21:02:53 2015
New Revision: 292288
URL: https://svnweb.freebsd.org/changeset/base/292288

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

Modified:
  stable/10/sbin/pfctl/pfctl.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sbin/pfctl/pfctl.c
==============================================================================
--- stable/10/sbin/pfctl/pfctl.c	Tue Dec 15 19:57:56 2015	(r292287)
+++ stable/10/sbin/pfctl/pfctl.c	Tue Dec 15 21:02:53 2015	(r292288)
@@ -1845,6 +1845,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))



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512152102.tBFL2s4g087468>