mirror of
https://github.com/nginx/nginx.git
synced 2024-11-27 23:49:00 +08:00
Request body: avoid potential overflow.
This commit is contained in:
parent
d5da8fa776
commit
03fcee5d78
@ -953,13 +953,13 @@ ngx_http_request_body_chunked_filter(ngx_http_request_t *r, ngx_chain_t *in)
|
|||||||
|
|
||||||
if (clcf->client_max_body_size
|
if (clcf->client_max_body_size
|
||||||
&& clcf->client_max_body_size
|
&& clcf->client_max_body_size
|
||||||
< r->headers_in.content_length_n + rb->chunked->size)
|
- r->headers_in.content_length_n < rb->chunked->size)
|
||||||
{
|
{
|
||||||
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
|
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
|
||||||
"client intended to send too large chunked "
|
"client intended to send too large chunked "
|
||||||
"body: %O bytes",
|
"body: %O+%O bytes",
|
||||||
r->headers_in.content_length_n
|
r->headers_in.content_length_n,
|
||||||
+ rb->chunked->size);
|
rb->chunked->size);
|
||||||
|
|
||||||
r->lingering_close = 1;
|
r->lingering_close = 1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user