You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rp...@apache.org on 2011/08/25 16:31:36 UTC
svn commit: r1161576 - /httpd/httpd/trunk/modules/http/byterange_filter.c
Author: rpluem
Date: Thu Aug 25 14:31:36 2011
New Revision: 1161576
URL: http://svn.apache.org/viewvc?rev=1161576&view=rev
Log:
* Adjust comment and don't get fooled by a negative end
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=1161576&r1=1161575&r2=1161576&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http/byterange_filter.c (original)
+++ httpd/httpd/trunk/modules/http/byterange_filter.c Thu Aug 25 14:31:36 2011
@@ -154,15 +154,14 @@ static apr_status_t copy_brigade_range(a
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);