httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <>
Subject Re: [PATCH] yet another slow function
Date Tue, 06 Jan 1998 23:49:28 GMT
Yes we could... and actually, consider that a patch in progress.  I'm
going to nail a lot more uses of ind.

strchr() is standard and faster than ind on many boxes... at least on
those where the vendor took the time to code it into assembly ;)


On Tue, 6 Jan 1998, Brian Behlendorf wrote:

> At 02:29 PM 1/6/98 -0800, Dean Gaudet wrote:
> >The beck attack (at least against 1.3) also tickles lameness in the
> >os_escape_path() routine.  Calling ind() is way too expensive.  This patch
> >fixes that lameness.  Oh yeah, calling sprintf() to convert a byte to hex
> >seems like a waste too.  Fix that as well.  I'll backport to 1.2 sometime. 
> I haven't chuckled while reading code in a long time :)  You performance nut.
> Couldn't we have safe_path_chars created by that cute program of yours at
> startup time?   Wouldn't that be safer if used on other character sets, or
> EBCDIC?  Sure, someone could simply rerun that program to generate that
> table, but at least this way we don't have to "port" anything.  And then we
> wouldn't need #IF 0'd code in the source, which is just to me kinda
> confusing.  Or maybe use ind() just at startup to create safe_path_chars
> from a straight-out list of acceptible characters.
> 	Brian
> --=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
> specialization is for insects

View raw message