]> granicus.if.org Git - apache/commitdiff
Fix a segfault seen on daedalus earlier this evening. All that was happening
authorCliff Woolley <jwoolley@apache.org>
Tue, 23 Oct 2001 09:41:54 +0000 (09:41 +0000)
committerCliff Woolley <jwoolley@apache.org>
Tue, 23 Oct 2001 09:41:54 +0000 (09:41 +0000)
was that we forgot to check whether ctx->bb was empty, so when we pulled the
first bucket, it would be the sentinel, and we'd segfault trying to apr_bucket_read
the sentinel.

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

server/core.c

index d62f8c38efa7210b6838714c960699a0e6917a21..dd572a98d5bc600afccf255922082589b54b0155 100644 (file)
@@ -2871,6 +2871,9 @@ static int core_input_filter(ap_filter_t *f, apr_bucket_brigade *b, ap_input_mod
         apr_bucket *e;
         apr_bucket_brigade *newbb;
 
+        if (APR_BRIGADE_EMPTY(ctx->b))
+            return APR_EOF;
+
         e = APR_BRIGADE_FIRST(ctx->b);
         rv = apr_bucket_read(e, &str, &len, mode);