www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 24685] New: std.stdio.File.rawRead allows reading raw

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

          Issue ID: 24685
           Summary: std.stdio.File.rawRead allows reading raw pointers
                    from files in  safe code
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: elpenguino+D gmail.com

This compiles on everything but windows, but really really shouldn't.

```
int* foo()  safe {
    int*[1] bar;
    return File("example.bin", "r").rawRead(bar[])[0];
}
```

--
Jul 25