[Libreoffice] Fwd: warning: the use of `tmpnam' is dangerous, better use `mkstemp'

Caolán McNamara caolanm at redhat.com
Tue Jun 14 06:09:13 PDT 2011


On Sat, 2011-06-11 at 15:37 +0200, Julien Nabet wrote:
> So I thought this :
> 1) for common part between Windows and other systems (Unix/Linux/BSD
> and Mac) or for Windows specific, only createTempFile should be used.
> 2) for Unix/Linux/BSD and Mac only part, mkstemp/mktemp should be used
> (to avoid overhead)
> 
> So tmpnam shouldn't be used at all.
> 
> Is this ok ?

Sure, though personally I'd just use createTempFile throughout to keep
things simple.

C.



More information about the LibreOffice mailing list