NetBSD Problem Report #3169
Received: (qmail-queue invoked from smtpd); 31 Jan 1997 02:24:04 -0000
Message-Id: <199701310215.SAA05891@spy.ipsec.com>
Date: Thu, 30 Jan 1997 18:15:29 -0800 (PST)
From: David Carrel <carrel@ipsec.com>
Reply-To: carrel@ipsec.com
To: gnats-bugs@gnats.netbsd.org
Subject: /usr/src/sbin/ipf won't build
X-Send-Pr-Version: 3.95
>Number: 3169
>Category: bin
>Synopsis: sbin/ipf won't build due to out of range comparison
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jan 30 18:35:01 +0000 1997
>Closed-Date: Fri Jan 31 10:18:49 +0000 1997
>Last-Modified: Fri Jan 31 10:19:42 +0000 1997
>Originator: David Carrel
>Release: source supped 30 Jan 1997
>Organization:
just me
>Environment:
System: NetBSD spy 1.2B NetBSD 1.2B (SPOOGE) #6: Wed Jan 22 01:10:58 PST 1997 carrel@spy:/home/NetBSD/src.970121/sys/arch/i386/compile/SPOOGE i386
>Description:
/usr/src/sbin/ipf fails to build on my hp300 due to a bad
comparison on parse.c:114. The value -1 is cast to an unsigned char (which
is bad) and then compared to a char.
>How-To-Repeat:
Try to build on the hp300. I'm not sure why but the hp300 compiler
catches more errors than the i386 compiler. I'm not sure why, but it is
true.
>Fix:
The following patch fixes this:
*** parse.c.orig Thu Jan 30 17:53:16 1997
--- parse.c Thu Jan 30 18:11:31 1997
***************
*** 111,117 ****
cpp++;
if (*(*cpp + 11) == '(') {
fil.fr_icode = icmpcode(*cpp + 12);
! if (fil.fr_icode == (unsigned char)-1) {
fprintf(stderr,
"uncrecognised icmp code %s\n",
*cpp + 12);
--- 111,117 ----
cpp++;
if (*(*cpp + 11) == '(') {
fil.fr_icode = icmpcode(*cpp + 12);
! if (fil.fr_icode == -1) {
fprintf(stderr,
"uncrecognised icmp code %s\n",
*cpp + 12);
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: veego
State-Changed-When: Fri Jan 31 02:18:49 PST 1997
State-Changed-Why:
Applied.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.