From owner-freebsd-bugs@FreeBSD.ORG Mon Aug 25 18:40:19 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F47916A4BF for ; Mon, 25 Aug 2003 18:40:19 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F1D143FE3 for ; Mon, 25 Aug 2003 18:40:18 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h7Q1eIUp083916 for ; Mon, 25 Aug 2003 18:40:18 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h7Q1eIrd083915; Mon, 25 Aug 2003 18:40:18 -0700 (PDT) Resent-Date: Mon, 25 Aug 2003 18:40:18 -0700 (PDT) Resent-Message-Id: <200308260140.h7Q1eIrd083915@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Chris S.J.Peron" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0632116A4BF for ; Mon, 25 Aug 2003 18:32:15 -0700 (PDT) Received: from staff.seccuris.com (staff.seccuris.com [204.112.0.40]) by mx1.FreeBSD.org (Postfix) with SMTP id 2DE7243FE0 for ; Mon, 25 Aug 2003 18:32:14 -0700 (PDT) (envelope-from cperon@staff.seccuris.com) Received: (qmail 59302 invoked by uid 1006); 26 Aug 2003 01:32:13 -0000 Message-Id: <20030826013213.59301.qmail@staff.seccuris.com> Date: 26 Aug 2003 01:32:13 -0000 From: "Chris S.J.Peron" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/55981: [patch] redundant argument count check in ipfw X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "Chris S.J.Peron" List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Aug 2003 01:40:19 -0000 >Number: 55981 >Category: bin >Synopsis: [patch] redundant argument count check in ipfw >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: Mon Aug 25 18:40:17 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Chris S.J. Peron >Release: FreeBSD 4.8-RELEASE i386 >Organization: >Environment: System: FreeBSD movl 5.1-CURRENT FreeBSD 5.1-CURRENT #14: Mon Aug 25 17:22:40 CDT 2003 modulus@movl:/usr/src/sys/i386/compile/RAID0 i386 >Description: When ipfw2 processes the MAC{mac} option it performs a redundant argument count check, then calls add_mac(). The first operation in add_mac() is the exact same argument count check. if (ac < 2) errx(EX_DATAERR, "MAC dst src"); >How-To-Repeat: N/A >Fix: --- /usr/src/sbin/ipfw/ipfw2.c.timeless Mon Aug 25 20:19:46 2003 +++ /usr/src/sbin/ipfw/ipfw2.c Mon Aug 25 20:19:50 2003 @@ -3379,8 +3379,6 @@ break; case TOK_MAC: - if (ac < 2) - errx(EX_USAGE, "MAC dst-mac src-mac"); if (add_mac(cmd, ac, av)) { ac -= 2; av += 2; } >Release-Note: >Audit-Trail: >Unformatted: