D2 toStringz Return Type

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Nov 8 06:39:29 PST 2008


Steven Schveighoffer wrote:
> "Andrei Alexandrescu" wrote
>> Steven Schveighoffer wrote:
>>> But you probably won't add it.  That's ok, I don't use Phobos anyways. 
>>> I'll be sure to add an appropriate function to Tango while porting it to 
>>> D2.
>> You may want to rethink before putting dangerous functions in widely-used 
>> libraries. Returning a writable zero-terminated char* is as dangerous as 
>> it gets, and fostering bad coding style too.
> 
> Nonsense.  Tango currently has such a function with D 1.x, and I've never 
> heard of any issues with it.

That doesn't mean much of anything.

 > I think you have overblown the danger here.

And it's not me.

http://marc.info/?l=bugtraq&m=105673479925709&q=p4
http://seclists.org/vulnwatch/2007/q1/0069.html
http://www.mail-archive.com/popt-devel@rpm5.org/msg00072.html
http://sourceware.org/ml/gdb-patches/2005-03/msg00237.html
http://mailman.mit.edu/pipermail/krbdev/2008-October/007022.html

I got bored of pasting. Just google for strcpy sprintf strcat gets. 
Again: please rethink.


Andrei



More information about the Digitalmars-d mailing list