If a INTEGER is only decoded with 8 bits one octet, and the
msb of that octet is 1, AD reads this as a signed integer,
and will therefore read a negative number.
This fixes that by incrementing the number of octets in a integer
if the msb is 1 and the number is positive.
Thanks for the PR! ASN.1 code has been left mostly untouched since the fork from the original project, and this kind of practical testing is very helpful in shaking out the bugs. LGTM, so I'm merging it.
When the number is positive.
If a INTEGER is only decoded with 8 bits one octet, and the msb of that octet is 1, AD reads this as a signed integer, and will therefore read a negative number.
This fixes that by incrementing the number of octets in a integer if the msb is 1 and the number is positive.
Fixes #21
(I also fixed a few tests that failed)