httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <jwool...@virginia.edu>
Subject Re: cvs commit: httpd-2.0/modules/filters mod_include.c
Date Sat, 25 Oct 2003 07:28:44 GMT
On Thu, 23 Oct 2003, [ISO-8859-15] André Malo wrote:

> * nd@apache.org wrote:
>
> >   Log:
> >   fix segfault which occured if the filename was not
> >   set, for example, when processing some error conditions.
>
> >   -    if ((t = strrchr(r->filename, '/'))) {
> >   +    if (r->filename && (t = strrchr(r->filename, '/'))) {
> >            apr_table_setn(e, "DOCUMENT_NAME", ++t);
> >        }
>
> In fact, r->filename is used way more often within the includes filter
> (in error messages). Should we catch these cases as well, i.e. replace
> occurences of r->filename with r->filename ? r->filename : "<NULL>"?

Uck.  I still think somebody ought to go on a mission to eliminate these
null r->filename cases.  I don't have time tho.  :(  Maybe a good thing
for some of us to look at at the Con.

In the meanwhile I guess we should be checking for it to be null, though,
yes.

--Cliff

Mime
View raw message