# HG changeset patch # User Maxim Dounin # Date 1393853993 -14400 # Node ID 8a2261c59f3b86fd0f8c5c88897443ab2bb750b1 # Parent c8a14fbd3ce9f59a0157fb0d0dbe37ca382aaba6 Request body: avoid potential overflow. diff --git a/src/http/ngx_http_request_body.c b/src/http/ngx_http_request_body.c --- a/src/http/ngx_http_request_body.c +++ b/src/http/ngx_http_request_body.c @@ -953,13 +953,13 @@ ngx_http_request_body_chunked_filter(ngx if (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, "client intended to send too large chunked " - "body: %O bytes", - r->headers_in.content_length_n - + rb->chunked->size); + "body: %O+%O bytes", + r->headers_in.content_length_n, + rb->chunked->size); r->lingering_close = 1;