httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@gmail.com>
Subject Re: [PATCH] don't crash with per-dir (location) rewrite config and NULL r->filename
Date Fri, 10 Sep 2004 12:39:37 GMT
On Fri, 10 Sep 2004 08:19:10 -0400, Geoffrey Young
<geoff@modperlcookbook.org> wrote:
> 
> 
> Jeff Trawick wrote:
> > See attached patch.  Given a module with map-to-storage hook which
> > leaves r->filename NULL, and config like the following, you get
> > segfault on platforms that don't like strlen(NULL).
> 
> given that, I understand this part
> 
> -            if (strcmp(r->filename, ofilename) == 0) {
> +            if (ofilename != NULL && strcmp(r->filename, ofilename) == 0)
{
> 
> but not the rest of the patch.  why would you need/want to set r->filename
> in this instance?

because that's what the rule matching logic looks at

Mime
View raw message