From 3ca01f799467a7efe32ea047a3d8025cfbfba527 Mon Sep 17 00:00:00 2001 From: Ruediger Pluem Date: Thu, 25 Aug 2011 14:31:36 +0000 Subject: [PATCH] * 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 --- modules/http/byterange_filter.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/http/byterange_filter.c b/modules/http/byterange_filter.c index 9a375dd067..c691644164 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); -- 2.49.0