Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
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?