Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Sep 2004 05:37:50 GMT
From:      "Jukka A. Ukkonen" <jau@iki.fi>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/71485: function list() in ipfw2 uses an uninitialized variable 'last'
Message-ID:  <200409080537.i885bodQ040239@www.freebsd.org>
Resent-Message-ID: <200409080540.i885eAaA038631@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         71485
>Category:       bin
>Synopsis:       function list() in ipfw2 uses an uninitialized variable 'last'
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 08 05:40:10 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Jukka A. Ukkonen
>Release:        4.10-STABLE
>Organization:
>Environment:
FreeBSD mjolnir 4.10-STABLE FreeBSD 4.10-STABLE #0: Sat Aug 14 11:58:59 EET DST 2004     jau@mjolnir:/home/src/sys/compile/Mjolnir  i386
>Description:
      In the function list() in ipfw2 the variable 'last' is not
initialized.
>How-To-Repeat:
      
>Fix:
Apply the following patch to ipfw2. (Tab characters have been carefully
preserved by using xcut and xclipboard to import the patch to this web
form.)

--- ipfw2.c.orig	Wed Sep  8 08:28:00 2004
+++ ipfw2.c	Wed Sep  8 08:28:07 2004
@@ -1689,7 +1689,7 @@
 	int exitval = EX_OK;
 	int lac;
 	char **lav;
-	u_long rnum, last;
+	u_long rnum, last = 0;
 	char *endptr;
 	int seen = 0;
 

>Release-Note:
>Audit-Trail:
>Unformatted:



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