diff options
author | Björn Gustavsson <[email protected]> | 2013-06-10 09:36:42 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-06-10 09:36:42 +0200 |
commit | 24a7d69e1272184a849a2a01bcfc476fc880b356 (patch) | |
tree | 53ce526a1f9ff42a0ac20bf323014d0add9fefab /lib/asn1/src/asn1ct_imm.erl | |
parent | eaf001a831f56e72f7046fdf2f96d91cdee3d182 (diff) | |
parent | a33dbb822acb67cf071e606cd28d15090075202f (diff) | |
download | otp-24a7d69e1272184a849a2a01bcfc476fc880b356.tar.gz otp-24a7d69e1272184a849a2a01bcfc476fc880b356.tar.bz2 otp-24a7d69e1272184a849a2a01bcfc476fc880b356.zip |
Merge branch 'maint'
* maint:
PER/UPER: Correct decoding of SEQUENCEs with more than 64 extensions
testConstraints: Improve tests of semi-constrained INTEGERs
Test ENUMERATED with many extended values
PER, UPER: Fix record name mismatch between HRL file and decoding code
UPER: Correct encoding of ENUMERATED with more than 63 extended values
Add asn1_test_lib:hex_to_bin/1
Diffstat (limited to 'lib/asn1/src/asn1ct_imm.erl')
-rw-r--r-- | lib/asn1/src/asn1ct_imm.erl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/asn1/src/asn1ct_imm.erl b/lib/asn1/src/asn1ct_imm.erl index c6803a0f96..bf362db843 100644 --- a/lib/asn1/src/asn1ct_imm.erl +++ b/lib/asn1/src/asn1ct_imm.erl @@ -86,7 +86,7 @@ per_dec_enumerated(BaseNamedList, NamedListExt0, Aligned) -> bit_case(Base, Ext). per_dec_extension_map(Aligned) -> - Len = {add,per_dec_normally_small_number(Aligned),1}, + Len = per_dec_normally_small_length(Aligned), {get_bits,Len,[1,bitstring]}. per_dec_integer(Constraint0, Aligned) -> @@ -240,6 +240,11 @@ per_dec_normally_small_number(Aligned) -> Unlimited = per_decode_semi_constrained(0, Aligned), bit_case(Small, Unlimited). +per_dec_normally_small_length(Aligned) -> + Small = {add,{get_bits,6,[1]},1}, + Unlimited = decode_unconstrained_length(false, Aligned), + bit_case(Small, Unlimited). + per_decode_semi_constrained(Lb, Aligned) -> add_lb(Lb, {get_bits,decode_unconstrained_length(false, Aligned),[8]}). |