diff options
author | John Högberg <[email protected]> | 2017-12-01 12:22:53 +0100 |
---|---|---|
committer | John Högberg <[email protected]> | 2018-01-03 08:14:28 +0100 |
commit | d469368b9e14b9834017a7cf318f02950a4aadcb (patch) | |
tree | f2d5c672f0bade06dd82d85481477f17930daa08 /lib/kernel/doc | |
parent | 65df0ce5cec5fdee60c80409f322a58092526537 (diff) | |
download | otp-d469368b9e14b9834017a7cf318f02950a4aadcb.tar.gz otp-d469368b9e14b9834017a7cf318f02950a4aadcb.tar.bz2 otp-d469368b9e14b9834017a7cf318f02950a4aadcb.zip |
Disallow NULs in filename-encoded strings
Previously we accepted trailing NULs, which was backwards compatible
as such usage never resulted in misbehavior in the first place. The
downside is that it prevented erts_native_filename_need from
returning an accurate number of *actual characters*, needlessly
complicating encoding-agnostic code like erts_osenv.
Diffstat (limited to 'lib/kernel/doc')
-rw-r--r-- | lib/kernel/doc/src/file.xml | 7 | ||||
-rw-r--r-- | lib/kernel/doc/src/os.xml | 19 |
2 files changed, 2 insertions, 24 deletions
diff --git a/lib/kernel/doc/src/file.xml b/lib/kernel/doc/src/file.xml index 58abb35428..8477b0e148 100644 --- a/lib/kernel/doc/src/file.xml +++ b/lib/kernel/doc/src/file.xml @@ -93,13 +93,6 @@ 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> diff --git a/lib/kernel/doc/src/os.xml b/lib/kernel/doc/src/os.xml index 0a08e2c78a..c27182ff0b 100644 --- a/lib/kernel/doc/src/os.xml +++ b/lib/kernel/doc/src/os.xml @@ -58,17 +58,6 @@ operations to fail. </p> </note> - <warning> - <p> - Currently null characters at the end of filenames, - environment variable names and values will be accepted - by the primitive operations. Such filenames, environment - variable names and values are however still documented as - invalid. The implementation will also change in the - future and reject such filenames, environment variable - names and values. - </p> - </warning> </description> <datatypes> @@ -143,12 +132,8 @@ <warning><p>Previous implementation used to allow all characters as long as they were integer values greater than or equal to zero. This sometimes lead to unwanted results since null characters - (integer value zero) often are interpreted as string termination. - Current implementation still accepts null characters at the end - of <c><anno>Command</anno></c> even though the documentation - states that no null characters are allowed. This will however - be changed in the future so that no null characters at all will - be accepted.</p></warning> + (integer value zero) often are interpreted as string termination. The + current implementation rejects these.</p></warning> <p><em>Examples:</em></p> <code type="none"> LsOut = os:cmd("ls"), % on unix platform |