]> granicus.if.org Git - apache/commitdiff
don't segfault in mod_mime's find_ct() if we get there without having set r->filename
authorBrian Pane <brianp@apache.org>
Sun, 15 Dec 2002 16:37:19 +0000 (16:37 +0000)
committerBrian Pane <brianp@apache.org>
Sun, 15 Dec 2002 16:37:19 +0000 (16:37 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97924 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/http/mod_mime.c

diff --git a/CHANGES b/CHANGES
index e5fc3596434fadb76a9b7967eb372bea2b24d80d..c54a717631f2b7d1761f9c2c4413d051b8c2cf7f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@ Changes with Apache 2.1.0-dev
 
   [Remove entries to the current 2.0 section below, when backported]
 
+  *) mod_mime: Workaround to prevent a segfault if r->filename=NULL
+     [Brian Pane]
   *) Added character set support to mod_auth_LDAP to allow it to 
      convert extended characters used in the user ID to UTF-8 
      before authenticating against the LDAP directory. The new
index e91cdf987213d562f0eaf1a891ef65e4bc3fbd77..eecd8d1ac710586f3aa67d61bfce8f17a4f4b344 100644 (file)
@@ -790,6 +790,10 @@ static int find_ct(request_rec *r)
         return OK;
     }
 
+    if (!r->filename) {
+        return DECLINED;
+    }
+
     conf = (mime_dir_config *)ap_get_module_config(r->per_dir_config,
                                                    &mime_module);
     exception_list = apr_array_make(r->pool, 2, sizeof(char *));