]> Cypherpunks repositories - gostls13.git/commitdiff
net/textproto: pass missing argument to fmt.Sprintf
authorIan Lance Taylor <iant@golang.org>
Thu, 27 Feb 2020 02:34:25 +0000 (18:34 -0800)
committerIan Lance Taylor <iant@golang.org>
Sun, 1 Mar 2020 02:13:41 +0000 (02:13 +0000)
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 <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
src/net/textproto/reader.go

index a505da985c281a038726899dbf55a1662b8e8d1a..d26e981ae420fbf8963e6ad5a4d67bbcd6931872 100644 (file)
@@ -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
 }