mirleft / ocaml-asn1-combinators

Embed typed ASN.1 grammars in OCaml
ISC License
35 stars 20 forks source link

Fix regression for 0x05 0x80 #32

Closed hannesm closed 4 years ago

hannesm commented 4 years ago

as reported by @emillon

hannesm commented 4 years ago

the issue is that 0x80 expresses an indefinite length (i.e. a byte sequence with traling 0x00 0x00), but it got ignored for primitives. this was not an issue in 0.2.0, but got introduced in 9da82ac4dfac24dc3b135696f52581d301f01877.

As reference, http://lapo.it/asn1js/#BQA results in "invalid tag with undefined length at offset 2".