Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified)) by mollari.NetBSD.org (Postfix) with ESMTPS id 7EFBE1A9213 for ; Sun, 19 Jul 2020 22:04:29 +0000 (UTC) Received: by mail.netbsd.org (Postfix, from userid 605) id 1721484D8D; Sun, 19 Jul 2020 22:04:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 8E82484D61 for ; Sun, 19 Jul 2020 22:04:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id mWvqYajON-F0 for ; Sun, 19 Jul 2020 22:04:28 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 2D3B284CD8 for ; Sun, 19 Jul 2020 22:04:28 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 26E38FB28; Sun, 19 Jul 2020 22:04:28 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Sun, 19 Jul 2020 22:04:28 +0000 From: "Roland Illig" Subject: CVS commit: src/usr.bin/make To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20200719220428.26E38FB28@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Roland Illig" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: rillig Date: Sun Jul 19 22:04:28 UTC 2020 Modified Files: src/usr.bin/make: var.c src/usr.bin/make/unit-tests: sysv.exp sysv.mk Log Message: make(1): make ampersand in ${VAR:from=to&} an ordinary character In SysV substitutions, wildcards are expressed with % instead of &. The & is not mentioned in the manual page, and having another wildcard for the whole word would be such an obscure feature that not even pkgsrc uses it. The easiest way to discover this feature had been to read the source code of make(1) or to use a fuzzer and accidentally stumble upon this edge case. To generate a diff of this commit: cvs rdiff -u -r1.275 -r1.276 src/usr.bin/make/var.c cvs rdiff -u -r1.5 -r1.6 src/usr.bin/make/unit-tests/sysv.exp cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/sysv.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.