From: Stefan Fritsch Date: Sun, 28 Aug 2011 20:02:38 +0000 (+0000) Subject: Fix iteration over string X-Git-Tag: 2.3.15~322 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=abb883009e30fa354c94e50499c907f991e06a99;p=apache Fix iteration over string git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162581 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/byterange_filter.c b/modules/http/byterange_filter.c index c49e35c07f..d314c60a0d 100644 --- a/modules/http/byterange_filter.c +++ b/modules/http/byterange_filter.c @@ -433,7 +433,7 @@ static int ap_set_byterange(request_rec *r, apr_off_t clength, int in_merge = 0; indexes_t *idx; int overlaps = 0, reversals = 0; - int i, ranges = 1; + int ranges = 1; const char *it; if (r->assbackwards) { @@ -492,8 +492,8 @@ static int ap_set_byterange(request_rec *r, apr_off_t clength, range += 6; or = apr_pstrdup(r->pool, range); it = range; - for (i = 0; i < strlen(it); i++) { - if (*it == ',') { + while (*it) { + if (*it++ == ',') { ranges++; } }