[Issue 20590] New: Files with NUL bytes in them are incorrectly accepted

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 20 21:44:42 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=20590

          Issue ID: 20590
           Summary: Files with NUL bytes in them are incorrectly accepted
           Product: D
           Version: D2
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: elronnd at elronnd.net

Sample code:

import std.stdio;                                                               
import std.file: readText;

void main() {
        writeln(readText("foo.txt\0blah"));
}

The file 'foo.txt\0blah' /can't/ exist on unix (idk about windows), but foo.txt
exists and is read.

--


More information about the Digitalmars-d-bugs mailing list