aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-09-01 14:40:51 +0200
committerSverker Eriksson <[email protected]>2017-09-01 14:40:51 +0200
commitfdf359ff4063cf065f5355b9d13a2e76b6c9cd75 (patch)
tree4ac0d0b8cb778048eacb2aef0d46a7fbad0c566b /erts/emulator/test
parent0907bf464b27353255b93abe455933bc6d66d741 (diff)
parent50da40f8404969b5a1533026d49e2e2669ffadff (diff)
downloadotp-fdf359ff4063cf065f5355b9d13a2e76b6c9cd75.tar.gz
otp-fdf359ff4063cf065f5355b9d13a2e76b6c9cd75.tar.bz2
otp-fdf359ff4063cf065f5355b9d13a2e76b6c9cd75.zip
Merge branch 'maint'
Diffstat (limited to 'erts/emulator/test')
-rw-r--r--erts/emulator/test/bif_SUITE.erl2
-rw-r--r--erts/emulator/test/binary_SUITE.erl3
2 files changed, 5 insertions, 0 deletions
diff --git a/erts/emulator/test/bif_SUITE.erl b/erts/emulator/test/bif_SUITE.erl
index 2320870a0e..04b7f2de15 100644
--- a/erts/emulator/test/bif_SUITE.erl
+++ b/erts/emulator/test/bif_SUITE.erl
@@ -525,6 +525,8 @@ binary_to_atom(Config) when is_list(Config) ->
?BADARG(binary_to_atom(id(<<255>>), utf8)),
?BADARG(binary_to_atom(id(<<255,0>>), utf8)),
?BADARG(binary_to_atom(id(<<16#C0,16#80>>), utf8)), %Overlong 0.
+ <<B:1/binary, _/binary>> = id(<<194, 163>>), %Truncated character ERL-474
+ ?BADARG(binary_to_atom(B, utf8)),
%% system_limit failures.
?SYS_LIMIT(binary_to_atom(id(<<0:512/unit:8,255>>), utf8)),
diff --git a/erts/emulator/test/binary_SUITE.erl b/erts/emulator/test/binary_SUITE.erl
index 4d17276e5c..61536bacd7 100644
--- a/erts/emulator/test/binary_SUITE.erl
+++ b/erts/emulator/test/binary_SUITE.erl
@@ -599,6 +599,9 @@ bad_binary_to_term(Config) when is_list(Config) ->
%% Bad float.
bad_bin_to_term(<<131,70,-1:64>>),
+
+ %% Truncated UTF8 character (ERL-474)
+ bad_bin_to_term(<<131,119,1,194,163>>),
ok.
bad_bin_to_term(BadBin) ->