[erlang-bugs] ASN1 parsing bug

Morten Nygaard Åsnes morten.aasnes@REDACTED
Fri Jan 10 13:41:13 CET 2014


Hi,
I've encountered what I think is a bug in parsing asn1. Here is a testcase:

Testcase DEFINITIONS IMPLICIT TAGS ::=

BEGIN

 BaseType ::= ENUMERATED {
foo,
bar,
buz,
 qux,
...
}
 SubType ::= BaseType ( foo | bar )

END

This gives the following error:

28> asn1ct:compile("Testcase", [ber,verbose]).
Erlang ASN.1 version "2.0.4", compiling "Testcase.asn"
Compiler Options: [ber,verbose,{i,"."}]
asn1error:13:'Testcase':'SubType'
{asn1,{undefined_type,bar}}
{error,[{error,{type,13,'Testcase','SubType',
                     {asn1,{undefined_type,bar}}}}]}

If I remove the extension marker in BaseType, it compiles fine.

This is using R16B03 on Windows
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140110/eec8ced7/attachment.htm>


More information about the erlang-bugs mailing list