Commit 5188c87c authored by Ivan Kutuzov's avatar Ivan Kutuzov Committed by Brad Fitzpatrick

encoding/pem: fix for TestFuzz, PEM type should not contain a colon

Fixes #22238

Change-Id: I8184f789bd4120f3e71c9374c7c2fcbfa95935bf
Reviewed-on: https://go-review.googlesource.com/132635Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 6f9b94ab
......@@ -213,7 +213,9 @@ func TestFuzz(t *testing.T) {
}
testRoundtrip := func(block Block) bool {
if isBad(block.Type) {
// Reject bad Type
// Type with colons will proceed as key/val pair and cause an error.
if isBad(block.Type) || strings.Contains(block.Type, ":") {
return true
}
for key, val := range block.Headers {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment