diff options
author | Raimo Niskanen <[email protected]> | 2017-08-24 09:37:16 +0200 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2017-08-24 09:37:16 +0200 |
commit | 710f9437498a8a9df62a6c7cecd6eb632561754b (patch) | |
tree | 00d7dc89d265b8e4607b22f78445dee811834876 /lib/asn1/src | |
parent | d50bc5031eb0889c894bf20f5206cfc06162f30a (diff) | |
parent | 41878bba817fc2ec9e08529afe19c2655742dbd1 (diff) | |
download | otp-710f9437498a8a9df62a6c7cecd6eb632561754b.tar.gz otp-710f9437498a8a9df62a6c7cecd6eb632561754b.tar.bz2 otp-710f9437498a8a9df62a6c7cecd6eb632561754b.zip |
Merge branch 'maint-20' into maint
* maint-20:
Updated OTP version
Prepare release
Accept non-binary options as socket-options
Bump version
Fix broken handling of default values in extensions for PER
compiler: Fix live regs update on allocate in validator
Take fail labels into account when determining liveness in block ops
Check for overflow when appending binaries, and error out with system_limit
Diffstat (limited to 'lib/asn1/src')
-rw-r--r-- | lib/asn1/src/asn1ct_constructed_per.erl | 6 | ||||
-rw-r--r-- | lib/asn1/src/asn1rtt_per_common.erl | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/asn1/src/asn1ct_constructed_per.erl b/lib/asn1/src/asn1ct_constructed_per.erl index 3f1be4febb..aff383479b 100644 --- a/lib/asn1/src/asn1ct_constructed_per.erl +++ b/lib/asn1/src/asn1ct_constructed_per.erl @@ -985,9 +985,11 @@ gen_enc_components_call1(Gen, TopType, [C|Rest], DynamicEnc, Ext) -> Imm1; 'OPTIONAL' -> enc_absent(Gen, Element, [asn1_NOVALUE], Imm1); - {'DEFAULT',Def} -> + {'DEFAULT',Def} when Ext =:= noext -> DefValues = def_values(Type, Def), - enc_absent(Gen, Element, DefValues, Imm1) + enc_absent(Gen, Element, DefValues, Imm1); + {'DEFAULT',_} -> + enc_absent(Gen, Element, [asn1_DEFAULT], Imm1) end, Imm = case Imm2 of [] -> []; diff --git a/lib/asn1/src/asn1rtt_per_common.erl b/lib/asn1/src/asn1rtt_per_common.erl index 2ecc9e4bc7..5b5f47dfee 100644 --- a/lib/asn1/src/asn1rtt_per_common.erl +++ b/lib/asn1/src/asn1rtt_per_common.erl @@ -542,6 +542,7 @@ extension_bitmap(_Val, Pos, Limit, Acc) when Pos >= Limit -> extension_bitmap(Val, Pos, Limit, Acc) -> Bit = case element(Pos, Val) of asn1_NOVALUE -> 0; + asn1_DEFAULT -> 0; _ -> 1 end, extension_bitmap(Val, Pos+1, Limit, (Acc bsl 1) bor Bit). |