fix segfault if there is single large_client_header_buffers and a request line fills it completely
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index a0c4ea3..56eee26 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c
@@ -954,9 +954,17 @@ } if (rv == NGX_DECLINED) { - len = r->header_in->end - r->header_name_start; p = r->header_name_start; + if (p == NULL) { + ngx_log_error(NGX_LOG_INFO, c->log, 0, + "client sent too large request"); + ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST); + return; + } + + len = r->header_in->end - p; + if (len > NGX_MAX_ERROR_STR - 300) { len = NGX_MAX_ERROR_STR - 300; p[len++] = '.'; p[len++] = '.'; p[len++] = '.';