From: Jim Jagielski Date: Thu, 25 Aug 2011 13:32:03 +0000 (+0000) Subject: Remove some merging fun between RĂ¼diger and my patches ;) X-Git-Tag: 2.3.15~362 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=96e81ce0f1f58ee85dac4c1cba6f4aa9744fbe1d;p=apache Remove some merging fun between RĂ¼diger and my patches ;) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1161563 13f79535-47bb-0310-9956-ffa450edef68 --- 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))