From owner-freebsd-bugs Fri Jan 8 10:20:11 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA01684 for freebsd-bugs-outgoing; Fri, 8 Jan 1999 10:20:11 -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 KAA01664 for ; Fri, 8 Jan 1999 10:20:06 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id KAA19050; Fri, 8 Jan 1999 10:20:00 -0800 (PST) Received: from lamb.sas.com (lamb.sas.com [192.35.83.8]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA01120 for ; Fri, 8 Jan 1999 10:17:48 -0800 (PST) (envelope-from jwd@unx.sas.com) Received: from mozart (mozart.unx.sas.com [192.58.184.8]) by lamb.sas.com (8.9.1/8.9.1) with SMTP id NAA14341 for ; Fri, 8 Jan 1999 13:17:17 -0500 (EST) Received: from freebsd.unx.sas.com by mozart (5.65c/SAS/Domains/5-6-90) id AA09395; Fri, 8 Jan 1999 13:17:16 -0500 Received: (from jwd@localhost) by freebsd.unx.sas.com (8.9.1/8.9.1) id NAA00528; Fri, 8 Jan 1999 13:07:43 -0500 (EST) (envelope-from jwd) Message-Id: <199901081807.NAA00528@freebsd.unx.sas.com> Date: Fri, 8 Jan 1999 13:07:43 -0500 (EST) From: jwd@unx.sas.com Reply-To: jwd@unx.sas.com To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/9393: make(1) /usr/src/usr.bin/make/parse.c strncmp(opc,":sh') is bad Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 9393 >Category: bin >Synopsis: /usr/src/usr.bin/make/parse.c strncmp(opc,":sh') is bad >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jan 8 10:20:00 PST 1999 >Closed-Date: >Last-Modified: >Originator: John DeBoskey >Release: FreeBSD 3.0-CURRENT i386 >Organization: SAS Institute >Environment: FreeBSD FreeBSD.pc.sas.com 3.0-CURRENT FreeBSD 3.0-CURRENT #0 -current machine with sources current as of 19990108. >Description: The variable opc is decremented 1 time too many. If the character pointed to by opc happens to be a ':' and the variable name being assigned to starts with "sh", then the assignment type is erroniously set to VAR_SHELL. >How-To-Repeat: I seem to be the only one having this problem. It only happens during a 'cd /usr/src/release && make release' when building the dynamically created make file 'boot_crunch.mk' (inside the release.4 target). >Fix: After determining that 'opc' is nolonger within the bounds of the variable 'line', increment it by 1 to bring it back to the start of 'line', instead of allowing it to point at a garbage character that might just happen to be a ':'. --- /usr/src/usr.bin/make/parse.c.orig Sun May 31 02:23:33 1998 +++ /usr/src/usr.bin/make/parse.c Fri Jan 8 03:05:23 1999 @@ -1412,8 +1412,10 @@ default: #ifdef SUNSHCMD while (*opc != ':') - if (--opc < line) + if (--opc < line) { + ++opc; break; + } if (strncmp(opc, ":sh", 3) == 0) { type = VAR_SHELL; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message