encoding/asn1: possible inconsistency between asn1 tag and unmarshal parameter #44288
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?Ubuntu 18.04.5 LTS/x86_64
What did you do?
I stumbled upon this (possible) inconsistency between the asn1 tag embedded in a byte slice to be unmarshalled as asn1 and the parameter supplied to the unmarshaller. It seems that it's possible, for instance, to unmarshal the following byte array (specifying the "printable" parameter)
[]byte{20 /* TagT61String */, 13, 72, 101, 108, 108, 111, 44, 32, /* 2 non-ASCII chars follow*/ 228, 184, 150, 231, 149, 140}
while in fact it
More examples available here
What did you expect to see?
An error
What did you see instead?
No error and a successful unmarshalling
The text was updated successfully, but these errors were encountered: