aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test/file_name_SUITE.erl
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-09-06 17:00:14 +0200
committerRickard Green <[email protected]>2017-09-27 17:47:01 +0200
commiteae496a72e270fd7af411714738e99a7fadfd19b (patch)
tree4fed861eddc50d9676e2fe03bb0dc46c6b8f98bf /lib/kernel/test/file_name_SUITE.erl
parent02fd746c40e829adbe77cc526c7df904698e2534 (diff)
downloadotp-eae496a72e270fd7af411714738e99a7fadfd19b.tar.gz
otp-eae496a72e270fd7af411714738e99a7fadfd19b.tar.bz2
otp-eae496a72e270fd7af411714738e99a7fadfd19b.zip
Don't allow null in filenames
Diffstat (limited to 'lib/kernel/test/file_name_SUITE.erl')
-rw-r--r--lib/kernel/test/file_name_SUITE.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/kernel/test/file_name_SUITE.erl b/lib/kernel/test/file_name_SUITE.erl
index 899102c908..f23529fec9 100644
--- a/lib/kernel/test/file_name_SUITE.erl
+++ b/lib/kernel/test/file_name_SUITE.erl
@@ -302,7 +302,9 @@ check_normal(Mod) ->
{ok, BC} = Mod:read(FD,1024),
ok = file:close(FD)
end || {regular,Name,Content} <- NormalDir ],
+ {error, badarg} = Mod:rename("fil1\0tmp_fil2","tmp_fil1"),
Mod:rename("fil1","tmp_fil1"),
+ {error, badarg} = Mod:read_file("tmp_fil1\0.txt"),
{ok, <<"fil1">>} = Mod:read_file("tmp_fil1"),
{error,enoent} = Mod:read_file("fil1"),
Mod:rename("tmp_fil1","fil1"),