diff options
author | Björn Gustavsson <[email protected]> | 2013-03-08 09:51:43 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-03-08 11:36:24 +0100 |
commit | 7c1786ef06498a80f982aa08da30e3775184c5d3 (patch) | |
tree | 161f88675eb0021edde8ebbd38d799aa04e92362 /lib/asn1/test | |
parent | 05f11890bdfec4bfc3a78e191a87e70a937ffc54 (diff) | |
download | otp-7c1786ef06498a80f982aa08da30e3775184c5d3.tar.gz otp-7c1786ef06498a80f982aa08da30e3775184c5d3.tar.bz2 otp-7c1786ef06498a80f982aa08da30e3775184c5d3.zip |
PER/UPER: Correct decoding of ENUMERATEDs with a single value
An ENUMERATED with as single value is not encoded. The decoder
incorrectly assumed that it was encoded in one bit.
Diffstat (limited to 'lib/asn1/test')
-rw-r--r-- | lib/asn1/test/asn1_SUITE_data/Prim.asn1 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/asn1/test/asn1_SUITE_data/Prim.asn1 b/lib/asn1/test/asn1_SUITE_data/Prim.asn1 index 17a5d3490a..c3d54dbbb3 100644 --- a/lib/asn1/test/asn1_SUITE_data/Prim.asn1 +++ b/lib/asn1/test/asn1_SUITE_data/Prim.asn1 @@ -22,6 +22,8 @@ BEGIN Enum ::= ENUMERATED {monday(1),tuesday(2),wednesday(3),thursday(4), friday(5),saturday(6),sunday(7)} + SingleEnumVal ::= ENUMERATED {true} + SingleEnumValExt ::= ENUMERATED {true, ...} ObjId ::= OBJECT IDENTIFIER @@ -35,4 +37,15 @@ BEGIN base (2), exponent (-125..128) } ) + Seq ::= SEQUENCE { + n Null, + i1 INTEGER (0..63), + e1 SingleEnumVal, + i2 INTEGER (0..63), + e2 SingleEnumVal, + i3 INTEGER (0..63), + b Bool, + i4 INTEGER (0..63) + } + END |