Skip to content

Commit

Permalink
Range filter: avoid negative range start.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mdounin committed Jul 11, 2017
1 parent 92111c9 commit d289616
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/http/modules/ngx_http_range_filter_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit d289616

Please sign in to comment.