httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Smojver <bo...@rexursive.com>
Subject Re: tempnam v. mkstemp
Date Fri, 03 Oct 2003 22:23:45 GMT
No worries then.

On Fri, 2003-10-03 at 18:36, Joe Schaefer wrote:
> Bojan Smojver <bojan@rexursive.com> 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 :-). 
-- 
Bojan


Mime
View raw message