]> granicus.if.org Git - apache/commitdiff
PR#39672: Check that filter exists before trying to insert it
authorNick Kew <niq@apache.org>
Mon, 29 May 2006 11:49:02 +0000 (11:49 +0000)
committerNick Kew <niq@apache.org>
Mon, 29 May 2006 11:49:02 +0000 (11:49 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@410079 13f79535-47bb-0310-9956-ffa450edef68

modules/filters/mod_filter.c

index 17d3de7efa4fd4baadbf65d40a7e23c39988fd05..383b64a6aa8f569cc13fc311934a47619c26297b 100644 (file)
@@ -755,6 +755,11 @@ static void filter_insert(request_rec *r)
 
     for (p = cfg->chain; p; p = p->next) {
         filter = apr_hash_get(cfg->live_filters, p->fname, APR_HASH_KEY_STRING);
+        if (filter == NULL) {
+            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
+                          "Unknown filter %s not added", p->fname);
+            continue;
+        }
         ap_add_output_filter_handle(filter, NULL, r, r->connection);
 #ifndef NO_PROTOCOL
         if (ranges && (filter->proto_flags