1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-23 22:49:01 +03:00

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
This commit is contained in:
Eric Covener
2026-07-20 19:50:48 +00:00
parent ec3cb46574
commit 2b3075af73
2 changed files with 3 additions and 1 deletions

View File

@@ -0,0 +1,2 @@
*) mod_dir: Fix a crash in fixup_dir for a request not mapped to any type.
PR68527. [Eric Covener]

View 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;