httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kraemer <Martin.Krae...@Fujitsu-Siemens.com>
Subject Re: Status of 1.3.18 release
Date Mon, 19 Feb 2001 10:28:45 GMT
On Sun, Feb 18, 2001 at 06:31:03PM -0600, William A. Rowe, Jr. wrote:
> static void fix_hostname(request_rec *r)
> {
>     char *host = ap_palloc(r->pool, strlen(r->hostname) + 1);
>     const char *src;
>     char *dst;
> 
>     /* check and copy the host part */
>     src = r->hostname;
>     /* unescape the hostname first */
>     if (ap_unescape_url(src) != OK) {
> 
> 
> This looks like badness ... ap_unescape_url mucks src, but r->hostname
> and src are declared const.  This is unhealthy, no?

Perhaps making a local copy, unescape that, and re-assign it to r->hostname
at the beginning? Dean?

   Martin

-- 
<Martin.Kraemer@Fujitsu-Siemens.com>    |       Fujitsu Siemens
       <martin@apache.org>              |   81730  Munich,  Germany

Mime
View raw message