Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
encoding/asn1: weird error handling for parseBitString #29908
For the following code, error handling "invalid padding bits in BIT STRING" is confusing and doesn't look right. Many bitmap is just one byte long and definitely bigger than 0. Maybe I understand asn1's bit string wrong.
Please provide more detail: do you have an example of a specific input that produces an incorrect or misleading error?
Per the description at http://luca.ntop.org/Teaching/Appunti/asn1.html:
The condition in the code rejects:
Which of those “doesn't look right”, or what's missing?