]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
PR68527: fixup_dir segfault with no content-type
authorEric Covener <covener@apache.org>
Mon, 20 Jul 2026 19:50:48 +0000 (19:50 +0000)
committerEric Covener <covener@apache.org>
Mon, 20 Jul 2026 19:50:48 +0000 (19:50 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1936401 13f79535-47bb-0310-9956-ffa450edef68

changes-entries/pr68527.txt [new file with mode: 0644]
modules/mappers/mod_dir.c

diff --git a/changes-entries/pr68527.txt b/changes-entries/pr68527.txt
new file mode 100644 (file)
index 0000000..2a0cd27
--- /dev/null
@@ -0,0 +1,2 @@
+  *) mod_dir: Fix a crash in fixup_dir for a request not mapped to any type. 
+     PR68527.  [Eric Covener]
index d13babf81853d0d4cf9b9ba0652700ccec179735..fdf64ae2288a7c14bf49b40f6ae84e602802e802 100644 (file)
@@ -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;