Open Google-Autofuzz opened 4 years ago
Hi, the error message could be clearer, but is there any real problem? You're getting an exception for malformed input. Sounds fine to me.
I would expect an exception provided by asn1crypto.
I didn't manage to find the right™ way to handle exceptions that could be raised by asn1crypto in its documentation. Is except Exception
the way to go?
https://github.com/wbond/asn1crypto/blob/master/asn1crypto/core.py#L159
raises ValueError - when the ASN.1 header length is longer than the data
.
I expect (really not sure) that all parser errors will be some ValueError
.
IndexError
isn't a ValueError
.
IndexError
isn't aValueError
.
whoops :-)
I think we can improve the parse functions to be sure to raise a ValueError
When running the following code with the latest version of asn1crypto on the attached input in an unexpected
IndexError
exception:test.txt