mirror of
https://github.com/golang/go
synced 2024-09-25 05:10:12 -06:00
encoding/pem: fix for TestFuzz, PEM type should not contain a colon
Fixes #22238 Change-Id: I8184f789bd4120f3e71c9374c7c2fcbfa95935bf Reviewed-on: https://go-review.googlesource.com/132635 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
6f9b94ab66
commit
5188c87c95
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user