From: Cliff Woolley Date: Tue, 23 Oct 2001 09:41:54 +0000 (+0000) Subject: Fix a segfault seen on daedalus earlier this evening. All that was happening X-Git-Tag: 2.0.27~41 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=79403ed8e0bc7a41a7cbb9c290582d413385a620;p=thirdparty%2Fapache%2Fhttpd.git Fix a segfault seen on daedalus earlier this evening. All that was happening 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 --- diff --git a/server/core.c b/server/core.c index d62f8c38efa..dd572a98d5b 100644 --- a/server/core.c +++ b/server/core.c @@ -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);