From 96e81ce0f1f58ee85dac4c1cba6f4aa9744fbe1d Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Thu, 25 Aug 2011 13:32:03 +0000 Subject: [PATCH] =?utf8?q?Remove=20some=20merging=20fun=20between=20R?= =?utf8?q?=C3=BCdiger=20and=20my=20patches=20;)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1161563 13f79535-47bb-0310-9956-ffa450edef68 --- modules/http/byterange_filter.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/modules/http/byterange_filter.c b/modules/http/byterange_filter.c index 79c4a8b668..3cc5cf202f 100644 --- a/modules/http/byterange_filter.c +++ b/modules/http/byterange_filter.c @@ -153,17 +153,6 @@ static apr_status_t copy_brigade_range(apr_bucket_brigade *bb, apr_uint64_t start64, end64; apr_off_t pofft; - /* - * ala apr_brigade_partition(), reduce casting hell... - * we know that apr_off_t and apr_size_t will fit into - * apr_uint64_t. - */ - start64 = (apr_uint64_t)start; - end64 = (apr_uint64_t)end; - - if (start < 0 || start64 > end64) - return APR_EINVAL; - /* * We know that start and end are >= 0. See the comments in * apr_brigade_partition why we should convert everything @@ -173,6 +162,9 @@ static apr_status_t copy_brigade_range(apr_bucket_brigade *bb, start64 = (apr_uint64_t)start; end64 = (apr_uint64_t)end; + if (start < 0 || start64 > end64) + return APR_EINVAL; + for (e = APR_BRIGADE_FIRST(bb); e != APR_BRIGADE_SENTINEL(bb); e = APR_BUCKET_NEXT(e)) -- 2.40.0