From nobody@FreeBSD.org  Wed Sep  8 05:37:50 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id DB22016A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  8 Sep 2004 05:37:50 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id D3D9B43D1D
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  8 Sep 2004 05:37:50 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i885boHG040240
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 8 Sep 2004 05:37:50 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.11/8.12.11/Submit) id i885bodQ040239;
	Wed, 8 Sep 2004 05:37:50 GMT
	(envelope-from nobody)
Message-Id: <200409080537.i885bodQ040239@www.freebsd.org>
Date: Wed, 8 Sep 2004 05:37:50 GMT
From: "Jukka A. Ukkonen" <jau@iki.fi>
To: freebsd-gnats-submit@FreeBSD.org
Subject: function list() in ipfw2 uses an uninitialized variable 'last'
X-Send-Pr-Version: www-2.3

>Number:         71485
>Category:       bin
>Synopsis:       function list() in ipfw2 uses an uninitialized variable 'last'
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    maxim
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 08 05:40:10 GMT 2004
>Closed-Date:    Fri Sep 10 13:43:30 GMT 2004
>Last-Modified:  Fri Sep 10 13:43:30 GMT 2004
>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:

From: Gleb Smirnoff <glebius@freebsd.org>
To: "Jukka A. Ukkonen" <jau@iki.fi>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: bin/71485: function list() in ipfw2 uses an uninitialized variable 'last'
Date: Wed, 8 Sep 2004 12:33:10 +0400

   Jukka,
 
 can you show where this variable is _used_ uninitialized?
 
 -- 
 Totus tuus, Glebius.
 GLEBIUS-RIPN GLEB-RIPE

From: Maxim Konovalov <maxim@macomnet.ru>
To: Gleb Smirnoff <glebius@freebsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: bin/71485: function list() in ipfw2 uses an uninitialized variable
 'last'
Date: Wed, 8 Sep 2004 15:02:45 +0400 (MSD)

 $ cvs -Q co -rRELENG_4_10_0_RELEASE ipfw
 
 $ cd ipfw
 
 $ make -DIPFW2
 Warning: Object directory not changed from original /vol0/home/maxim/ipfw
 cc -O -pipe  -Wall -DIPFW2    -c ipfw2.c
 ipfw2.c: In function `list':
 ipfw2.c:1681: warning: `last' might be used uninitialized in this function
 cc -O -pipe  -Wall -DIPFW2     -o ipfw ipfw2.o
 gzip -cn ipfw.8 > ipfw.8.gz
 
 $ uname -r
 4.10-STABLE
 
 -- 
 Maxim Konovalov
Responsible-Changed-From-To: freebsd-bugs->maxim 
Responsible-Changed-By: glebius 
Responsible-Changed-When: Wed Sep 8 11:34:09 GMT 2004 
Responsible-Changed-Why:  
Pass to maxim, since he is ipfw maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71485 
State-Changed-From-To: open->closed 
State-Changed-By: maxim 
State-Changed-When: Fri Sep 10 13:43:16 GMT 2004 
State-Changed-Why:  
Fixed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=71485 
>Unformatted:
