httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeffrey W. Baker" <jwba...@acm.org>
Subject Re: [PATCH] Fix 1.3.17 crash in util_uri.c, etc.
Date Sat, 17 Feb 2001 16:55:59 GMT
On Sat, 17 Feb 2001, Martin Kraemer wrote:

> On Wed, Feb 14, 2001 at 07:56:05AM -0800, Jeffrey W. Baker wrote:
> > > It looks good, although in the line
> > >    29	                uptr->scheme = DEFAULT_URI_SCHEME;
> > > you assign to a "const" structure, and some compilers dislike that.
> > 
> > Ah, you are right I meant to remove that but my versions got out of sync.
> 
> Does that mean: your patch, minus exactly this one line?
> But that breaks the check for the default port further down.
> (uptr->port == ap_default_port_for_scheme(uptr->scheme)))
> although if no scheme is set, the port and per_str are probably
> unset as well?!

I don't see how it breaks the test, since the call to
ap_default_port_for_scheme() is preceded by a test of the existence of
uptr->scheme:

  if (uptr->port_str &&
      !(uptr->port   &&
        uptr->scheme &&
        uptr->port == ap_default_port_for_scheme(uptr->scheme))) {

Thus we never get to the function call unless there is something besides
NULL in uptr->scheme.

Updated patch in five minutes, with one line removed and the silly loop
replaced with memset.

-jwb


Mime
View raw message