From: Eric Covener Date: Mon, 20 Jul 2026 19:50:48 +0000 (+0000) Subject: PR68527: fixup_dir segfault with no content-type X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=2b3075af7326cd84196a2d90211f4f40f42f68ea;p=thirdparty%2Fapache%2Fhttpd.git PR68527: fixup_dir segfault with no content-type git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1936401 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/changes-entries/pr68527.txt b/changes-entries/pr68527.txt new file mode 100644 index 0000000000..2a0cd27d12 --- /dev/null +++ b/changes-entries/pr68527.txt @@ -0,0 +1,2 @@ + *) mod_dir: Fix a crash in fixup_dir for a request not mapped to any type. + PR68527. [Eric Covener] diff --git a/modules/mappers/mod_dir.c b/modules/mappers/mod_dir.c index d13babf818..fdf64ae228 100644 --- a/modules/mappers/mod_dir.c +++ b/modules/mappers/mod_dir.c @@ -303,7 +303,7 @@ static int fixup_dir(request_rec *r) if (d->checkhandler == MODDIR_ON && strcmp(r->handler, DIR_MAGIC_TYPE)) { /* Prevent DIR_MAGIC_TYPE from leaking out when someone has taken over */ - if (!strcmp(r->content_type, DIR_MAGIC_TYPE)) { + if (r->content_type && !strcmp(r->content_type, DIR_MAGIC_TYPE)) { r->content_type = NULL; } return DECLINED;