You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Randy Terbush <ra...@zyzzyva.com> on 1997/01/31 19:09:24 UTC

Re: BUG: suEXEC problem: QUERY_STRING not set (fwd)

> 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.






Re: BUG: suEXEC problem: QUERY_STRING not set (fwd)

Posted by Marc Slemko <ma...@znep.com>.
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...