|Anonymous | Login | Signup for a new account||2019-03-22 04:00 UTC|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000821||Taste||[All Projects] ASN.1 Compiler v4||public||2018-12-11 17:31||2019-01-12 16:30|
|Priority||normal||Severity||major||Reproducibility||have not tried|
Wrong encoding for enumerated values
In this example:
pbody [determinant nid]
nid is used as determinant for choice pbody. Notice that is it essential that nid get encoded with its value, and not packed with base 0 (which should be ensured by
The encoding/decoding code is almost ok, as all needed structures are created to preserve enumerative values.
However, when encoding the enumerative value, this call is done:
here min=13 and max=15 come from the definition of T-NID-Packet, which at the moment is limited to two entries:
T-NID-Packet ::= ENUMERATED
With min=13, stm-13 will be encoded with 0 (instead of 13), and stm-15 with 2 (instead of 15).
|Steps To Reproduce|
See attached archive for a complete example.
|Tags||No tags attached.|
|Attached Files||test-asn.tgz [^] (3,362 bytes) 2018-12-11 17:31|
You should change then ACN encoding spec of nid
nid T-NID-Packet [encode-values]
you should write :
nid T-NID-Packet [encode-values, size 4, encoding pos-int]
If you don't provide the encoding property the ASN.1 Compiler will use the uPER encoding and that's why you get the call to
If you are OK with that please close the ticket.
|2018-12-11 17:email@example.com||New Issue|
|2018-12-11 17:firstname.lastname@example.org||File Added: test-asn.tgz|
|2018-12-13 08:13||maxime||Assigned To||
new => assigned
|2019-01-12 16:30||gmamais||Note Added: 0003556|
|Copyright © 2000 - 2011 MantisBT Group|