Date: 31 Mar 2006 08:11:16 -0000 From: <candy-sendpr@kgc.co.jp> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/95146: [ipfw][patch]ipfw -p option handler is bogus Message-ID: <20060331081116.93187.qmail@xxx.kgc.co.jp> Resent-Message-ID: <200603310820.k2V8KJDn034388@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 95146 >Category: bin >Synopsis: [ipfw][patch]ipfw -p option handler is bogus >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: Fri Mar 31 08:20:14 GMT 2006 >Closed-Date: >Last-Modified: >Originator: >Release: FreeBSD 6.0-RELEASE-p6 i386 >Organization: - >Environment: FreeBSD 5.4-R or FreeBSD 6.0-R >Description: bogus things happen if you type `ipfw -p /usr/bin/m4' ipfw fopen(3)s /usr/bin/m4 then pass the FILE pointer to /usr/bin/m4. >How-To-Repeat: # ipfw -p /usr/bin/m4 command is (null) : TMPDIR=/tmp: No such file or directory : COLUMNS=80: No such file or directory : FTP_PASSIVE_MODE=YES: No such file or directory : BLOCKSIZE=K: No such file or directory (snip) ipfw: preprocessor exited with signal 11 # >Fix: --- ipfw2.c.orig Fri Mar 31 16:45:23 2006 +++ ipfw2.c Fri Mar 31 17:05:15 2006 @@ -5099,8 +5099,11 @@ */ av += optind - 1; ac -= optind - 1; + if (ac == 1) { + errx(EX_USAGE, "no filename arguments"); + } av[ac-1] = NULL; - fprintf(stderr, "command is %s\n", av[0]); + /*fprintf(stderr, "command is %s\n", av[0]);*/ break; case 'q': >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060331081116.93187.qmail>