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

Caolán McNamara caolanm at redhat.com
Fri Jun 10 00:58:57 PDT 2011


On Thu, 2011-06-09 at 23:43 +0200, Jesús Corrius wrote:
> On Thu, Jun 9, 2011 at 11:24 PM, Julien Nabet <serval2412 at yahoo.fr> wrote:
> > In the Unix man of tmpnam, we can read this :
> > "
> > BUGS
> >       Never use this function.  Use mkstemp(3) or tmpfile(3) instead.
> > "
>
> The best option probably (don't throw tomatoes at me!) would be to use
> something similar to this for windows (maybe in sal?):

See sal/inc/osl/file.hxx osl::File::createTempFile and lxr for
createTempFile

C.



More information about the LibreOffice mailing list