mirror of
https://github.com/nginx/nginx.git
synced 2025-02-25 18:55:26 -06:00
Range filter: avoid negative range start.
Suffix ranges no longer allowed to set negative start values, to prevent ranges with negative start from appearing even if total size protection will be removed.
This commit is contained in:
@@ -355,7 +355,7 @@ ngx_http_range_parse(ngx_http_request_t *r, ngx_http_range_filter_ctx_t *ctx,
|
||||
}
|
||||
|
||||
if (suffix) {
|
||||
start = content_length - end;
|
||||
start = (end < content_length) ? content_length - end : 0;
|
||||
end = content_length - 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user