httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@znep.com>
Subject Re: BUG: suEXEC problem: QUERY_STRING not set (fwd)
Date Fri, 31 Jan 1997 23:30:18 GMT
On Fri, 31 Jan 1997, Randy Terbush wrote:

> > On Fri, 31 Jan 1997, Jason A. Dour wrote:
> > 
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > 
> > > Acked.  This confirms a enivron** error for at least two platforms now.
> > > Randy, how is your research going?
> > 
> > See PR#142.
> > 
> > (remove the free(environ)).
> > 
> 
> Actually, The code does:
> 
>     environ = cleanenv;
>     free(cleanenv);
> 
> Is this an issue where I should be doing memcpy(&environ, &cleanenv)?
> 
> The current code works fine on FreeBSD.

environ is a pointer.  cleanenv is a pointer.  You assign environ to be a
pointer to what is stored in cleanenv, then you deallocate cleanenv.  That
means the memory is no longer valid; on many systems the data will still
be there, but that's a fluke.  Perhaps you just aren't awake yet (I know
the feeling...) or I'm missing something... 



Mime
View raw message