From d469368b9e14b9834017a7cf318f02950a4aadcb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?John=20H=C3=B6gberg?=
Date: Fri, 1 Dec 2017 12:22:53 +0100
Subject: 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.
---
lib/kernel/doc/src/os.xml | 19 ++-----------------
1 file changed, 2 insertions(+), 17 deletions(-)
(limited to 'lib/kernel/doc/src/os.xml')
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.
-
-
- 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.
-
-
@@ -143,12 +132,8 @@
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 Command 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.
+ (integer value zero) often are interpreted as string termination. The
+ current implementation rejects these.
Examples:
LsOut = os:cmd("ls"), % on unix platform
--
cgit v1.2.3