Date: Fri, 8 Jan 1999 13:07:43 -0500 (EST) From: jwd@unx.sas.com To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: bin/9393: make(1) /usr/src/usr.bin/make/parse.c strncmp(opc,":sh') is bad Message-ID: <199901081807.NAA00528@freebsd.unx.sas.com>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901081807.NAA00528>