diff options
author | Björn Gustavsson <[email protected]> | 2017-02-28 09:59:00 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2017-02-28 09:59:00 +0100 |
commit | 883f7e91005a5527c7b199bac8d642518a502061 (patch) | |
tree | f1de85fa494e41332c3a38e88e448dcaf9bf7eb9 /lib/asn1/src/asn1rtt_per_common.erl | |
parent | fcaee0793b6d97f64b7a4a0e2d27783ab9d4c20b (diff) | |
parent | 3f7d4324c7b99f93a6ad36015071276692534fa1 (diff) | |
download | otp-883f7e91005a5527c7b199bac8d642518a502061.tar.gz otp-883f7e91005a5527c7b199bac8d642518a502061.tar.bz2 otp-883f7e91005a5527c7b199bac8d642518a502061.zip |
Merge pull request #1352 from bjorng/bjorn/asn1/better-error-messages/OTP-13961
Better error descriptions for ASN.1 encoding/decoding failures
Diffstat (limited to 'lib/asn1/src/asn1rtt_per_common.erl')
-rw-r--r-- | lib/asn1/src/asn1rtt_per_common.erl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/asn1/src/asn1rtt_per_common.erl b/lib/asn1/src/asn1rtt_per_common.erl index 3896cb7fa5..e7edfb1ee0 100644 --- a/lib/asn1/src/asn1rtt_per_common.erl +++ b/lib/asn1/src/asn1rtt_per_common.erl @@ -140,6 +140,8 @@ encode_relative_oid(Val) when is_tuple(Val) -> encode_relative_oid(Val) when is_list(Val) -> list_to_binary([e_object_element(X)||X <- Val]). +encode_unconstrained_number(Val) when not is_integer(Val) -> + exit({error,{asn1,{illegal_integer,Val}}}); encode_unconstrained_number(Val) when Val >= 0 -> if Val < 16#80 -> |