diff options
author | Rickard Green <rickard@erlang.org> | 2017-09-06 17:00:14 +0200 |
---|---|---|
committer | Rickard Green <rickard@erlang.org> | 2017-09-27 17:47:01 +0200 |
commit | eae496a72e270fd7af411714738e99a7fadfd19b (patch) | |
tree | 4fed861eddc50d9676e2fe03bb0dc46c6b8f98bf /lib/stdlib/doc/src/filelib.xml | |
parent | 02fd746c40e829adbe77cc526c7df904698e2534 (diff) | |
download | erlang-eae496a72e270fd7af411714738e99a7fadfd19b.tar.gz |
Don't allow null in filenames
Diffstat (limited to 'lib/stdlib/doc/src/filelib.xml')
-rw-r--r-- | lib/stdlib/doc/src/filelib.xml | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/stdlib/doc/src/filelib.xml b/lib/stdlib/doc/src/filelib.xml index 80c4acffdb..57c4348745 100644 --- a/lib/stdlib/doc/src/filelib.xml +++ b/lib/stdlib/doc/src/filelib.xml @@ -45,6 +45,30 @@ <p>For more information about raw filenames, see the <seealso marker="kernel:file"><c>file</c></seealso> module.</p> + + <note> + <p> + Functionality in this module generally assumes valid input and + does not necessarily fail on input that does not use a valid + encoding. You can validate the encoding of a filename using + <seealso marker="stdlib:filename#validate/1">filename:validate/1</seealso>. + </p> + <p> + File operations used to accept filenames containing + null characters (integer value zero). This caused + the name to be truncated at the first null character. + Filenames containing null characters inside the filename + are now <em>rejected</em> and will cause primitive + file operations fail. + </p> + </note> + <warning><p> + Currently null characters at the end of the filename + will be accepted by primitive file operations. Such + filenames are however still documented as invalid. The + implementation will also change in the future and + reject such filenames. + </p></warning> </description> <datatypes> |