]> Cypherpunks repositories - gostls13.git/commit
std: fix calls to Printf(s) with non-constant s
authorAlan Donovan <adonovan@google.com>
Thu, 23 May 2024 14:47:36 +0000 (10:47 -0400)
committerAlan Donovan <adonovan@google.com>
Thu, 23 May 2024 18:42:28 +0000 (18:42 +0000)
commitbf91eb3a8bb057a620f3823e4d6b74a529c0a44d
tree4492b65fecf2d22336f43b63794296541d56209a
parentc34c124f4007e79978674ba519b9421665060186
std: fix calls to Printf(s) with non-constant s

In all cases the intent was not to interpret s as a format string.
In one case (go/types), this was a latent bug in production.
(These were uncovered by a new check in vet's printf analyzer.)

Updates #60529

Change-Id: I3e17af7e589be9aec1580783a1b1011c52ec494b
Reviewed-on: https://go-review.googlesource.com/c/go/+/587855
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Russ Cox <rsc@golang.org>
14 files changed:
src/cmd/compile/internal/types2/builtins.go
src/crypto/rsa/pss_test.go
src/database/sql/sql_test.go
src/encoding/json/encode_test.go
src/go/types/builtins.go
src/go/types/typexpr.go
src/internal/coverage/cfile/emitdata_test.go
src/math/big/int_test.go
src/math/rand/rand_test.go
src/math/rand/v2/rand_test.go
src/net/http/serve_test.go
src/net/smtp/smtp.go
src/net/smtp/smtp_test.go
src/runtime/pprof/pprof_test.go