When values are not matched , data->has_error must be true , so that the caller of asn1_check_enumerated() can check for errors ,but it is False in case of errors so the caller will not be able to check the fail case.
There's no obvious 'Component' for ASN formatter/parser issues. Setting to File Services and hopefully someone who works on the ASN code will pick this up.
I'm incredibly pleased to say this code is unused, and can be removed.
This bug was referenced in samba master:
It's in master now, I don't think we need backports