aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/bif_SUITE.erl
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2017-10-05 16:58:15 +0200
committerErlang/OTP <[email protected]>2017-10-05 16:58:15 +0200
commit2484c5b486fc0db61d26c1b67b7770776342ce59 (patch)
treea5ae35bce54fde4e4895748aae84915b523eb11e /erts/emulator/test/bif_SUITE.erl
parent567e5a7f9261d753a4b4f44706fea6400b8a855c (diff)
parent7c67bbddb53c364086f66260701bc54a61c9659c (diff)
downloadotp-2484c5b486fc0db61d26c1b67b7770776342ce59.tar.gz
otp-2484c5b486fc0db61d26c1b67b7770776342ce59.tar.bz2
otp-2484c5b486fc0db61d26c1b67b7770776342ce59.zip
Merge branch 'sverker/19/binary_to_atom-utf8-crash/ERL-474/OTP-14590' into maint-19
* sverker/19/binary_to_atom-utf8-crash/ERL-474/OTP-14590: erts: Fix crash in binary_to_atom/term for invalid utf8
Diffstat (limited to 'erts/emulator/test/bif_SUITE.erl')
-rw-r--r--erts/emulator/test/bif_SUITE.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/erts/emulator/test/bif_SUITE.erl b/erts/emulator/test/bif_SUITE.erl
index f70fb0e501..e795057918 100644
--- a/erts/emulator/test/bif_SUITE.erl
+++ b/erts/emulator/test/bif_SUITE.erl
@@ -464,6 +464,9 @@ 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)),
+
[?BADARG(binary_to_atom(<<C/utf8>>, utf8)) || C <- lists:seq(256, 16#D7FF)],
[?BADARG(binary_to_atom(<<C/utf8>>, utf8)) || C <- lists:seq(16#E000, 16#FFFD)],
[?BADARG(binary_to_atom(<<C/utf8>>, utf8)) || C <- lists:seq(16#10000, 16#8FFFF)],