From: Ruediger Pluem Date: Thu, 25 Aug 2011 14:31:36 +0000 (+0000) Subject: * Adjust comment and don't get fooled by a negative end X-Git-Tag: 2.3.15~360 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3ca01f799467a7efe32ea047a3d8025cfbfba527;p=thirdparty%2Fapache%2Fhttpd.git * Adjust comment and don't get fooled by a negative end git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1161576 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/byterange_filter.c b/modules/http/byterange_filter.c index 9a375dd0670..c6916441643 100644 --- a/modules/http/byterange_filter.c +++ b/modules/http/byterange_filter.c @@ -154,15 +154,14 @@ static apr_status_t copy_brigade_range(apr_bucket_brigade *bb, apr_off_t pofft; /* - * We know that start and end are >= 0. See the comments in - * apr_brigade_partition why we should convert everything - * to apr_uint64_t. In short apr_off_t (for values >= 0)and apr_size_t - * fit into apr_uint64_t. + * Once we know that start and end are >= 0 convert everything to apr_uint64_t. + * See the comments in apr_brigade_partition why. + * In short apr_off_t (for values >= 0)and apr_size_t fit into apr_uint64_t. */ start64 = (apr_uint64_t)start; end64 = (apr_uint64_t)end; - if (start < 0 || start64 > end64) + if (start < 0 || end < 0 || start64 > end64) return APR_EINVAL; for (e = APR_BRIGADE_FIRST(bb);