httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Wilson <and...@tees.elsevier.co.uk>
Subject Re: FreeBSD segfault...
Date Tue, 19 Dec 1995 12:31:29 GMT
> Hi,
> 
> 	gcc/freebsd2.1/apache1.0.0 and a module curry tasting like
> this:

Got some more on this, there appears to be a problem with
contrib/mod_actions.c:

>From mod_actions.c ~ line 136 we have a check like this:

    if (!strcmp(table_get(conf->action_types,  r->content_type), NULL))
        return(DECLINED);

I think the idea is for the module to DECLINE if no action handlers
have been defined.  The check is passing a NULL into strcmp, and this is
r0ngr0ngr0ng.  Specifically this will fail on any compliant C library,
so if it doesn't fail on your machine then perhaps there's something
bogus.

This test replaces the one above and looks for a NULL return value from
table_get to indicate that the module's got no work to do and should
decline:

    if (table_get(conf->action_types,  r->content_type) == NULL)
        return(DECLINED);

Alexei?  What was your intention when you wrote this strcmp check in?
Have I interpreted this correctly?

As a further check, try running the following program (it should barf):

--- cut here ---
#include <stdio.h>
#include <strings.h>

main()
{

        printf("running...\n");
        strcmp("foo", NULL);
        printf("...run\n");
}
--- cut here ---

I'm going to mail a quick fix to the bugee, and see what happens...

Cheers,
Ay.

Mime
View raw message