# HG changeset patch # User Maxim Dounin # Date 1499778386 -10800 # Node ID 887c8c58ffeb12c301e4b3560e0d3c1bcb533bba # Parent e02555553d0b6b71718fdeb0194eec0cbee80653 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. diff --git a/src/http/modules/ngx_http_range_filter_module.c b/src/http/modules/ngx_http_range_filter_module.c --- a/src/http/modules/ngx_http_range_filter_module.c +++ b/src/http/modules/ngx_http_range_filter_module.c @@ -355,7 +355,7 @@ ngx_http_range_parse(ngx_http_request_t } if (suffix) { - start = content_length - end; + start = (end < content_length) ? content_length - end : 0; end = content_length - 1; }