aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2017-08-24 09:37:16 +0200
committerRaimo Niskanen <[email protected]>2017-08-24 09:37:16 +0200
commit710f9437498a8a9df62a6c7cecd6eb632561754b (patch)
tree00d7dc89d265b8e4607b22f78445dee811834876 /lib/asn1/src
parentd50bc5031eb0889c894bf20f5206cfc06162f30a (diff)
parent41878bba817fc2ec9e08529afe19c2655742dbd1 (diff)
downloadotp-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.erl6
-rw-r--r--lib/asn1/src/asn1rtt_per_common.erl1
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).