You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2011/08/25 15:32:04 UTC
svn commit: r1161563 - /httpd/httpd/trunk/modules/http/byterange_filter.c
Author: jim
Date: Thu Aug 25 13:32:03 2011
New Revision: 1161563
URL: http://svn.apache.org/viewvc?rev=1161563&view=rev
Log:
Remove some merging fun between RĂ¼diger and my patches ;)
Modified:
httpd/httpd/trunk/modules/http/byterange_filter.c
Modified: httpd/httpd/trunk/modules/http/byterange_filter.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/byterange_filter.c?rev=1161563&r1=1161562&r2=1161563&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http/byterange_filter.c (original)
+++ httpd/httpd/trunk/modules/http/byterange_filter.c Thu Aug 25 13:32:03 2011
@@ -154,17 +154,6 @@ static apr_status_t copy_brigade_range(a
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
* to apr_uint64_t. In short apr_off_t (for values >= 0)and apr_size_t
@@ -173,6 +162,9 @@ static apr_status_t copy_brigade_range(a
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))