From: Ian Lance Taylor Date: Thu, 27 Feb 2020 02:34:25 +0000 (-0800) Subject: net/textproto: pass missing argument to fmt.Sprintf X-Git-Tag: go1.15beta1~989 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=33e98326a25d54cef19e94ca73c45eaed8847f56;p=gostls13.git net/textproto: pass missing argument to fmt.Sprintf The vet tool didn't catch this because the fmt.Sprintf format argument was written as an expression. Fixes #37467 Change-Id: I72c20ba45e3f42c195fa5e68adcdb9837c7d7ad5 Reviewed-on: https://go-review.googlesource.com/c/go/+/221297 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot Reviewed-by: Emmanuel Odeke --- diff --git a/src/net/textproto/reader.go b/src/net/textproto/reader.go index a505da985c..d26e981ae4 100644 --- a/src/net/textproto/reader.go +++ b/src/net/textproto/reader.go @@ -557,7 +557,7 @@ func noValidation(_ []byte) error { return nil } // contain a colon. func mustHaveFieldNameColon(line []byte) error { if bytes.IndexByte(line, ':') < 0 { - return ProtocolError(fmt.Sprintf("malformed MIME header: missing colon: %q" + string(line))) + return ProtocolError(fmt.Sprintf("malformed MIME header: missing colon: %q", line)) } return nil }