Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 22094 invoked from network); 28 Mar 2006 19:06:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Mar 2006 19:06:25 -0000 Received: (qmail 18553 invoked by uid 500); 28 Mar 2006 19:06:21 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 18501 invoked by uid 500); 28 Mar 2006 19:06:20 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 18490 invoked by uid 99); 28 Mar 2006 19:06:20 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Mar 2006 11:06:20 -0800 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=DNS_FROM_RFC_POST X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [64.236.25.90] (HELO cnnimail33.turner.com) (64.236.25.90) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Mar 2006 11:06:19 -0800 Received: from turner.com (10.165.244.17) by cnnimail33.turner.com with ESMTP; 28 Mar 2006 14:05:59 -0500 Received: from [10.188.50.115] (dcs-vaio.turner.com [10.188.50.115]) by web.turner.com (Postfix) with ESMTP id D0D68C005B for ; Tue, 28 Mar 2006 14:05:59 -0500 (EST) Message-ID: <44298932.7020901@turner.com> Date: Tue, 28 Mar 2006 14:06:26 -0500 From: Brian Akins User-Agent: Thunderbird 1.5 (Macintosh/20051201) MIME-Version: 1.0 To: dev@httpd.apache.org Subject: [PATCH]mod_deflate check return of apr_bucket_read Content-Type: multipart/mixed; boundary="------------070900000509090202000209" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. --------------070900000509090202000209 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit -- Brian Akins Lead Systems Engineer CNN Internet Technologies --------------070900000509090202000209 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="deflate.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="deflate.patch" --- mod_deflate.c~ 2005-11-10 10:20:05.000000000 -0500 +++ mod_deflate.c 2006-03-28 14:04:20.000000000 -0500 @@ -518,7 +518,10 @@ } /* read */ - apr_bucket_read(e, &data, &len, APR_BLOCK_READ); + rv = apr_bucket_read(e, &data, &len, APR_BLOCK_READ); + if (rv != APR_SUCCESS) { + return rv; + } /* This crc32 function is from zlib. */ ctx->crc = crc32(ctx->crc, (const Bytef *)data, len); @@ -711,7 +714,10 @@ } /* read */ - apr_bucket_read(bkt, &data, &len, APR_BLOCK_READ); + rv = apr_bucket_read(bkt, &data, &len, APR_BLOCK_READ); + if (rv != APR_SUCCESS) { + return rv; + } /* pass through zlib inflate. */ ctx->stream.next_in = (unsigned char *)data; @@ -953,7 +959,10 @@ } /* read */ - apr_bucket_read(bkt, &data, &len, APR_BLOCK_READ); + rv = apr_bucket_read(bkt, &data, &len, APR_BLOCK_READ); + if (rv != APR_SUCCESS) { + return rv; + } /* first bucket contains zlib header */ if (!deflate_init++) { --------------070900000509090202000209--