httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <>
Subject Re: tempnam v. mkstemp
Date Fri, 03 Oct 2003 08:36:53 GMT
Bojan Smojver <> writes:

> Just noticed that libapreq uses it's own routine for temporary file,
> apreq_file_mktemp (file src/apreq.c in APREQ 2). This function call
> tempnam, which is apparently dangerous.

Nope, since apr doesn't provide any functional replacement for it.
Note that we only use tempnam() for locating the operating system's
temporary directory in case the user doesn't provide libapreq with 
a preferred location.  This is the raison d'etre for apreq_file_mktemp,
and is a very safe usage for tempnam, despite what your compiler tells
you :-). 

Joe Schaefer

View raw message