#dbugfix 15136
Steven Schveighoffer
schveiguy at gmail.com
Fri Jan 18 20:45:05 UTC 2019
On 1/18/19 3:21 PM, Dennis wrote:
> I don't like how the hacky implementation of toStringz is @trusted.
>
> Manifestation of problems:
> https://forum.dlang.org/thread/rbyetgbruyiohgudsbhg@forum.dlang.org
> Issue: https://issues.dlang.org/show_bug.cgi?id=15136
> Implementation:
> https://github.com/dlang/phobos/blob/master/std/string.d#L364-L365
>
TBH, fixing toStringz to not be hacky would make it so the manifestation
happened every time :)
I do agree that it shouldn't be @trusted if it's done the way it is. I
can think of ways to make it buffer overflow.
-Steve
More information about the Digitalmars-d
mailing list