aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src/asn1ct_check.erl
diff options
context:
space:
mode:
authorGustav Simonsson <[email protected]>2012-07-05 16:37:42 +0200
committerGustav Simonsson <[email protected]>2012-07-05 16:45:18 +0200
commit6ddf21fafe0846f3df0391ec785a91aaa4062bd5 (patch)
tree1c56228c0111d764e2928912dc53ad1211fd6543 /lib/asn1/src/asn1ct_check.erl
parent14f6a66f6410e1665ad39e95158420b0a45634d6 (diff)
downloadotp-6ddf21fafe0846f3df0391ec785a91aaa4062bd5.tar.gz
otp-6ddf21fafe0846f3df0391ec785a91aaa4062bd5.tar.bz2
otp-6ddf21fafe0846f3df0391ec785a91aaa4062bd5.zip
Add sorting in constraint checking on single values.
Fix a bug where a subtyped single value integer type where one or more values were predefined would result in generated encoding code having faulty range checks. See seq12102. OTP-10139
Diffstat (limited to 'lib/asn1/src/asn1ct_check.erl')
-rw-r--r--lib/asn1/src/asn1ct_check.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/asn1/src/asn1ct_check.erl b/lib/asn1/src/asn1ct_check.erl
index 494a2eddd9..59e82b7a57 100644
--- a/lib/asn1/src/asn1ct_check.erl
+++ b/lib/asn1/src/asn1ct_check.erl
@@ -4177,7 +4177,7 @@ check_constraint(S,{'SizeConstraint',Lb}) ->
check_constraint(S,{'SingleValue', L}) when is_list(L) ->
F = fun(A) -> resolv_value(S,A) end,
- {'SingleValue',lists:map(F,L)};
+ {'SingleValue',lists:sort(lists:map(F,L))};
check_constraint(S,{'SingleValue', V}) when is_integer(V) ->
Val = resolv_value(S,V),