trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: January 2012

Re: [trinity-devel] %s, %h variables, etc.

From: Darrell Anderson <humanreadable@...>
Date: Sat, 21 Jan 2012 12:31:46 -0800 (PST)
> > // Avoid naming collisions with KDE4.
> > char *logname;
> > logname = prog;
> > strcat ( logname, "-tde" );
> > sprintf( buf, "/var/log/%s.log", logname )
> 
> sprintf( buf, "/var/log/%s-tde.log", logname );
> 
> without the strcat line is better because if you strcat you
> could cause
> a buffer overflow in logname.
> Anyway sprintf is potentially insecure, using snprintf
> would probably be
> better.

Okay, thanks. So much to learn. :)

Tim decided to bump the bug report to blocker in order to rename kdm to tdm because he has his super duper magical conversion scripts to do things like that. :)

Darrell