From eugen@grosbein.pp.ru  Sat Jan 24 10:18:18 2004
Return-Path: <eugen@grosbein.pp.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 47B2616A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 24 Jan 2004 10:18:18 -0800 (PST)
Received: from grosbein.pp.ru (grgw.svzserv.kemerovo.su [213.184.64.130])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 5403043D5C
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 24 Jan 2004 10:17:57 -0800 (PST)
	(envelope-from eugen@grosbein.pp.ru)
Received: from grosbein.pp.ru (eugen@localhost [127.0.0.1])
	by grosbein.pp.ru (8.12.10/8.12.10) with ESMTP id i0OIHsoY010902
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 25 Jan 2004 01:17:54 +0700 (KRAT)
	(envelope-from eugen@grosbein.pp.ru)
Received: (from eugen@localhost)
	by grosbein.pp.ru (8.12.10/8.12.10/Submit) id i0OIHsFE010901;
	Sun, 25 Jan 2004 01:17:54 +0700 (KRAT)
	(envelope-from eugen)
Message-Id: <200401241817.i0OIHsFE010901@grosbein.pp.ru>
Date: Sun, 25 Jan 2004 01:17:54 +0700 (KRAT)
From: Eugene Grosbein <eugen@grosbein.pp.ru>
Reply-To: Eugene Grosbein <eugen@grosbein.pp.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] cosmetic off-by-one error in ipfw2 leads to SIGSEGV
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         61846
>Category:       bin
>Synopsis:       [PATCH] cosmetic off-by-one error in ipfw2 leads to SIGSEGV
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    maxim
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 24 10:20:08 PST 2004
>Closed-Date:    Sat Jan 31 11:17:27 PST 2004
>Last-Modified:  Sat Jan 31 11:17:27 PST 2004
>Originator:     Eugene Grosbein
>Release:        FreeBSD 4.9-STABLE i386
>Organization:
Svyaz Service JSC
>Environment:
System: FreeBSD grosbein.pp.ru 4.9-STABLE FreeBSD 4.9-STABLE #8: Sun Dec 14 20:25:57 KRAT 2003 eu@grosbein.pp.ru:/usr/local/obj/usr/local/src/sys/DADV i386

>Description:

	ipfw2 can segfault when is run with incorrect parameters

>How-To-Repeat:

	ipfw pipe 1 config 1Kbyte/s

>Fix:

--- ipfw2.c.orig	Sun Jan 25 01:12:53 2004
+++ ipfw2.c	Sun Jan 25 01:14:16 2004
@@ -2413,7 +2413,7 @@
 			break;
 
 		default:
-			errx(EX_DATAERR, "unrecognised option ``%s''", *av);
+			errx(EX_DATAERR, "unrecognised option ``%s''", av[-1]);
 		}
 	}
 	if (do_pipe == 1) {


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: maxim 
State-Changed-When: Sat Jan 24 11:20:21 PST 2004 
State-Changed-Why:  
Fixed in -CURRENT, thanks! 


Responsible-Changed-From-To: freebsd-bugs->maxim 
Responsible-Changed-By: maxim 
Responsible-Changed-When: Sat Jan 24 11:20:21 PST 2004 
Responsible-Changed-Why:  
MFC reminder. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=61846 
State-Changed-From-To: patched->closed 
State-Changed-By: maxim 
State-Changed-When: Sat Jan 31 11:17:00 PST 2004 
State-Changed-Why:  
Fixed in -STABLE as well. 

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