]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.25] cmd/go: fix pkg-config flag sanitization
authorRoland Shoemaker <roland@golang.org>
Tue, 3 Feb 2026 02:29:51 +0000 (18:29 -0800)
committerDavid Chase <drchase@google.com>
Wed, 25 Feb 2026 20:43:24 +0000 (12:43 -0800)
commit592530ed6b10205d0bbe724d7287278e89381dfc
treeb1f390a8e02e285a3f6546f7d95656c175a5663e
parent02227173776bb286585db6c124432972da2a9580
[release-branch.go1.25] cmd/go: fix pkg-config flag sanitization

Implement a new pkg-config safe flag list (containing everything except
for --log-file) and use that when checking flags passed to pkg-config,
instead of using checkCompilerFlags.

Updates #77387
Fixes #77438

Change-Id: Id6141d0a2934053aa43e3aa8ce402bd499c4c028
Reviewed-on: https://go-review.googlesource.com/c/go/+/741042
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Roland Shoemaker <roland@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit 28fbdf7acb4146b5bc3d88128e407d1344691839)
Reviewed-on: https://go-review.googlesource.com/c/go/+/745481
Reviewed-by: David Chase <drchase@google.com>
src/cmd/go/internal/work/exec.go
src/cmd/go/internal/work/security.go
src/cmd/go/testdata/script/cgo_bad_directives.txt