diff options
author | Björn Gustavsson <[email protected]> | 2013-06-07 09:53:18 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-06-08 12:24:12 +0200 |
commit | ac851623b548ac13ffc933516dae9db98626f0fe (patch) | |
tree | 7cdc8b374c047e79c52db9621589472c3523eaee /lib/asn1/src | |
parent | 52a612d8253d1abffd5d8c1c4eacd96e8651dd65 (diff) | |
download | otp-ac851623b548ac13ffc933516dae9db98626f0fe.tar.gz otp-ac851623b548ac13ffc933516dae9db98626f0fe.tar.bz2 otp-ac851623b548ac13ffc933516dae9db98626f0fe.zip |
PER/UPER: Correct decoding of SEQUENCEs with more than 64 extensions
Diffstat (limited to 'lib/asn1/src')
-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]}). |