]> granicus.if.org Git - apache/commitdiff
Remove some merging fun between RĂ¼diger and my patches ;)
authorJim Jagielski <jim@apache.org>
Thu, 25 Aug 2011 13:32:03 +0000 (13:32 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 25 Aug 2011 13:32:03 +0000 (13:32 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1161563 13f79535-47bb-0310-9956-ffa450edef68

modules/http/byterange_filter.c

index 79c4a8b668fc72bd0fbfc855c278d3fc29a56682..3cc5cf202f5c63ba8d3d731560cd776748beb231 100644 (file)
@@ -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))