]> granicus.if.org Git - apache/commitdiff
mod_filter: don't segfault on (unsupported) chained FilterProviders.
authorNick Kew <niq@apache.org>
Mon, 26 Nov 2007 14:56:12 +0000 (14:56 +0000)
committerNick Kew <niq@apache.org>
Mon, 26 Nov 2007 14:56:12 +0000 (14:56 +0000)
PR 43956

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@598299 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/filters/mod_filter.c

diff --git a/CHANGES b/CHANGES
index b676469457d830d2161ab6f5499d591f58c13e64..7fff2d6c307f2eb8c716fc9b0224a2998479f641 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 Changes with Apache 2.3.0
 [ When backported to 2.2.x, remove entry from this file ]
 
+  *) mod_filter: Don't segfault on (unsupported) chained FilterProvider usage.
+     PR 43956 [Nick Kew]
+
   *) mod_unique_id: Fix timestamp value in UNIQUE_ID.
      PR 37064 [Kobayashi <kobayashi firstserver.co.jp>]
 
index dfb0fde65bcdcafa337fc14f95b5e4d8bb86ca66..b072119e37674a2964fb71cff4c0f637c5e1da8c 100644 (file)
@@ -137,7 +137,12 @@ static int filter_init(ap_filter_t *f)
 
     harness_ctx *fctx = apr_pcalloc(f->r->pool, sizeof(harness_ctx));
     for (p = filter->providers; p; p = p->next) {
-        if (p->frec->filter_init_func) {
+        if (p->frec->filter_init_func == filter_init) {
+            ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, f->c,
+                          "Chaining of FilterProviders not supported");
+            return HTTP_INTERNAL_SERVER_ERROR;
+        }
+        else if (p->frec->filter_init_func) {
             f->ctx = NULL;
             if ((err = p->frec->filter_init_func(f)) != OK) {
                 ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, f->c,