You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@apache.org on 2026/07/20 19:50:48 UTC
svn commit: r1936401 - in httpd/httpd/trunk: changes-entries modules/mappers
Author: covener
Date: Mon Jul 20 19:50:48 2026
New Revision: 1936401
Log:
PR68527: fixup_dir segfault with no content-type
Added:
httpd/httpd/trunk/changes-entries/pr68527.txt
Modified:
httpd/httpd/trunk/modules/mappers/mod_dir.c
Added: httpd/httpd/trunk/changes-entries/pr68527.txt
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ httpd/httpd/trunk/changes-entries/pr68527.txt Mon Jul 20 19:50:48 2026 (r1936401)
@@ -0,0 +1,2 @@
+ *) mod_dir: Fix a crash in fixup_dir for a request not mapped to any type.
+ PR68527. [Eric Covener]
Modified: httpd/httpd/trunk/modules/mappers/mod_dir.c
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_dir.c Mon Jul 20 18:45:03 2026 (r1936400)
+++ httpd/httpd/trunk/modules/mappers/mod_dir.c Mon Jul 20 19:50:48 2026 (r1936401)
@@ -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;