From owner-freebsd-bugs Thu Jan 21 21:40:02 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA20792 for freebsd-bugs-outgoing; Thu, 21 Jan 1999 21:40:02 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA20734 for ; Thu, 21 Jan 1999 21:40:00 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id VAA28624; Thu, 21 Jan 1999 21:40:01 -0800 (PST) Received: from www.fio.cz (www.fio.cz [194.212.227.46]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA19752 for ; Thu, 21 Jan 1999 21:32:40 -0800 (PST) (envelope-from dan@obluda.cz) Received: (from root@localhost) by fio.cz (8.9.2/8.9.0) id DAA02648; Fri, 22 Jan 1999 03:54:56 +0100 (CET) Message-Id: <199901220254.DAA02648@fio.cz> Date: Fri, 22 Jan 1999 03:54:56 +0100 (CET) From: dan@obluda.cz Reply-To: dan@obluda.cz To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/9613: [PATCH] IPFW command-line parsing error Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 9613 >Category: bin >Synopsis: [PATCH] IPFW command-line parsing error >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jan 21 21:40:01 PST 1999 >Closed-Date: >Last-Modified: >Originator: Dan Lukes >Release: FreeBSD 2.2.8-RELEASE i386 >Organization: Obludarium >Environment: no special environment settings, standard instalation $Id: ipfw.c,v 1.34.2.20 1998/10/12 17:29:15 luigi Exp $ >Description: /sbin/ipfw/ipfw.c: when ipfw [-aftN] list [number ...] is called, but 'number' parameter is not number, the ipfw wrote bad error message and (sometime) ABEND. It is caused by missing dereference of printed parameter. The warn routine should be replaced by warnx, because the value of errno is set to nothing relevant in this context. >How-To-Repeat: ipfw l -a (for example) >Fix: --- ipfw.c.ORIG Mon Oct 12 19:29:15 1998 +++ ipfw.c Thu Jan 21 21:09:03 1999 @@ -493,7 +493,7 @@ rulenum = strtoul(*av++, &endptr, 10); if (*endptr) { exitval = 1; - warn("invalid rule number: %s", av - 1); + warnx("invalid rule number: %s", *(av - 1)); continue; } seen = 0; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message