httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: [PATCH] RE: Canonical filename overhaul
Date Sun, 01 Nov 1998 12:18:52 GMT
Marc Slemko wrote:
> 
> On Mon, 19 Oct 1998, Ken Parzygnat wrote:
> 
> > Ok, here's the patch for you to play with.  This patch is what
> > was previously discussed with one addition.  I heard through
> > the grapevine (credit Marc) that one problem was related to
> > use of alias names (the loveable "blah~1" type names).  Therefore,
> > I had another piece of code up my sleeve to address another problem,
> > but I'm putting it on the table now because it will solve this problem.
> 
> This doesn't want to apply for me; the util_win32.c chunks fail
> completely.
> 
> Could you either see if that may be something on your end or just send the
> whole util_win32.c file?
> 
> A few notes:
> 
> Get rid of the ap_assert()s.  There is no need for them and it is bad
> coding practice to use them for "normal" error conditions.  Yea, I
> know, they are a carryover from the existing code but it is broken.

There's only one mentioned in the patch that I can see (on the + side),
and that's:

+    ap_assert(szFile != NULL);
+    if (szFile == NULL || strlen(szFile) == 0)
+        return ap_pstrdup(pPool, "");

which is either correct, if we don't think you should pass a NULL to
ap_os_canonical_filename, in which case the following if is wrong, or
incorrect if the following if is correct.

BTW, wouldn't it make more sense to return NULL if szFile is NULL?

Double-BTW, there isn't a defined way for ap_os_canonical_filename to
return an error. Do we want one?

Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 735 0686| Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org/
and Technical Director|Email: ben@algroup.co.uk |
A.L. Digital Ltd,     |Apache-SSL author     http://www.apache-ssl.org/
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache/

Mime
View raw message