aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src/asn1rtt_per.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-03-14 14:50:35 +0100
committerBjörn Gustavsson <[email protected]>2013-03-14 14:50:35 +0100
commit5f764a80aab1af1bbae170f8819fe3c3393b0cb6 (patch)
treee747201ce1384c4c917c33077ad04b1eace75ba6 /lib/asn1/src/asn1rtt_per.erl
parent8e44167cb97ccf51a8ee3ca97449613ef3300514 (diff)
parente7f320e1f84da88a96c3bc4a76f43a296a738264 (diff)
downloadotp-5f764a80aab1af1bbae170f8819fe3c3393b0cb6.tar.gz
otp-5f764a80aab1af1bbae170f8819fe3c3393b0cb6.tar.bz2
otp-5f764a80aab1af1bbae170f8819fe3c3393b0cb6.zip
Merge branch 'maint-r16' into maint
* maint-r16: Prepare release PER: Ensure that the complete encoding is at least one byte PER/UPER: Correct decoding of ENUMERATEDs with a single value
Diffstat (limited to 'lib/asn1/src/asn1rtt_per.erl')
-rw-r--r--lib/asn1/src/asn1rtt_per.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/asn1/src/asn1rtt_per.erl b/lib/asn1/src/asn1rtt_per.erl
index 84ff809912..aa6cf4da0a 100644
--- a/lib/asn1/src/asn1rtt_per.erl
+++ b/lib/asn1/src/asn1rtt_per.erl
@@ -963,7 +963,10 @@ encode_relative_oid(Val) when is_list(Val) ->
%%
complete(L) ->
- asn1rt_nif:encode_per_complete(L).
+ case asn1rt_nif:encode_per_complete(L) of
+ <<>> -> <<0>>;
+ Bin -> Bin
+ end.
octets_to_complete(Len,Val) when Len < 256 ->
[20,Len,Val];