Nicolas Baradakis writes:
 > Marcus Metzler writes: 
 > 
 > > The latest version of the tuxzap programs are at
 > > http://www.metzlerbros.de
 > > and I don't think I use contruct likes the one above.
 > > I don't remember ever using such a contruct, maybe someone else
 > > patched the CVS because I used to use ostrstream.
 > 
 > I download tuxzap_programs-0.2.2 and  I see it also uses ostringstream
 > and no ostrstream.  However this time it's correct  because there is a
 > copy of the buffer _after_ it is initialized.
 >      
 >      char path[256];
 >      ostringstream str;
 >      
 >      [...] /* Initializing str */
 >      
 >      strcpy(path,str.str().data());
 >      
 > Note : I strongly recommand you to use strncpy() instead of strcpy(),
 > I would replace the last line with
 >      
 >      strncpy(path, str.str().data(), 256); 
 > 

Ok, I'll have a look at that, it's probably more secure.

Marcus

-- 
/--------------------------------------------------------------------\
| Dr. Marcus O.C. Metzler        |                                   |
|--------------------------------|-----------------------------------|
| [EMAIL PROTECTED]            | http://www.metzlerbros.de/        |
\--------------------------------------------------------------------/



-- 
Info:
To unsubscribe send a mail to [EMAIL PROTECTED] with "unsubscribe linux-dvb" as 
subject.

Reply via email to