mirror of
https://github.com/nginx/nginx.git
synced 2025-06-28 02:02:50 +08: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:
parent
92111c92e5
commit
d289616b0f
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user