encoding/pem successfully decodes a message in the following program; but if the message is re-encoded, decoding fails: ``` go package main import "encoding/pem" func main() { data := []byte("-----BEGIN foo-----\n\n-----END foo-----") b, _ := pem.Decode(data) if b == nil { return } enc := pem.EncodeToMemory(b) b1, _ := pem.Decode(enc) if b1 == nil { panic("can't decode encoded") } } ``` Either the first Decode should fail, or the second Decode should succeed. on commit 65518032b946bbb640cf1e3d5e66f537642503ed