mirror of
https://github.com/nginx/nginx.git
synced 2025-02-25 18:55:26 -06:00
Unsatisfiable range with start value greater than content length
was not properly skipped. The bug has been introduced in r4057.
This commit is contained in:
@@ -264,10 +264,6 @@ ngx_http_range_parse(ngx_http_request_t *r, ngx_http_range_filter_ctx_t *ctx)
|
||||
return NGX_HTTP_RANGE_NOT_SATISFIABLE;
|
||||
}
|
||||
|
||||
if (start >= content_length) {
|
||||
goto skip;
|
||||
}
|
||||
|
||||
while (*p == ' ') { p++; }
|
||||
|
||||
if (*p == ',' || *p == '\0') {
|
||||
@@ -299,7 +295,7 @@ ngx_http_range_parse(ngx_http_request_t *r, ngx_http_range_filter_ctx_t *ctx)
|
||||
end = content_length - 1;
|
||||
}
|
||||
|
||||
if (start > end) {
|
||||
if (start >= content_length || start > end) {
|
||||
goto skip;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user