httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@apache.org>
Subject Re: SEGV in head (was Re: Links on http://xml.apache.org/axis are incorrect)
Date Fri, 31 May 2002 16:45:26 GMT
On Fri, May 31, 2002 at 12:40:03PM -0400, Jeff Trawick wrote:
> It looks to me that this code in translate_userdir() is referencing x
> whether or not the char was found (by ap_strchr_c()).  I haven't
> looked in the coredump to verify that was the problem for this
> segfault. 

I agree.  Anyone think this wouldn't do the trick?  -- justin

Index: modules/mappers/mod_userdir.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_userdir.c,v
retrieving revision 1.48
diff -u -r1.48 mod_userdir.c
--- modules/mappers/mod_userdir.c	28 May 2002 23:14:15 -0000	1.48
+++ modules/mappers/mod_userdir.c	31 May 2002 16:43:42 -0000
@@ -317,7 +317,7 @@
             else
                 filename = apr_pstrcat(r->pool, userdir, "/", w, NULL);
         }
-        else if (ap_strchr_c(x, ':')) {
+        else if (x && ap_strchr_c(x, ':')) {
             redirect = apr_pstrcat(r->pool, x, w, dname, NULL);
             apr_table_setn(r->headers_out, "Location", redirect);
             return HTTP_MOVED_TEMPORARILY;

Mime
View raw message