src/http/ngx_http_request.c:1601: error: Integer Overflow L2
  ([0, `r->main->count`] - 1):unsigned32 by call to `ngx_http_finalize_request`.

src/http/ngx_http_request.c:1588:1: Parameter `r->main->count`
1586. 
1587. 
1588. static ngx_int_t
      ^
1589. ngx_http_process_request_header(ngx_http_request_t *r)
1590. {

src/http/ngx_http_request.c:1601:9: Call
1599.         ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
1600.                    "client sent HTTP/1.1 request without \"Host\" header");
1601.         ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST);
              ^
1602.         return NGX_ERROR;
1603.     }

src/http/ngx_http_request.c:2081:1: Parameter `r->main->count`
  2079. 
  2080. 
  2081. void
        ^
  2082. ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
  2083. {

src/http/ngx_http_request.c:2248:9: Call
  2246.     }
  2247. 
  2248.     if (ngx_http_post_action(r) == NGX_OK) {
                ^
  2249.         return;
  2250.     }

src/http/ngx_http_request.c:3091:1: <LHS trace>
3089. 
3090. 
3091. static ngx_int_t
      ^
3092. ngx_http_post_action(ngx_http_request_t *r)
3093. {

src/http/ngx_http_request.c:3091:1: Parameter `r->main->count`
    3089. 
    3090. 
    3091. static ngx_int_t
          ^
    3092. ngx_http_post_action(ngx_http_request_t *r)
    3093. {

src/http/ngx_http_request.c:3109:5: Binary operation: ([0, r->main->count] - 1):unsigned32 by call to `ngx_http_finalize_request` 
    3107.                    "post action: \"%V\"", &clcf->post_action);
    3108. 
    3109.     r->main->count--;
              ^
    3110. 
    3111.     r->http_version = NGX_HTTP_VERSION_9;

static ngx_int_t
ngx_http_post_action(ngx_http_request_t *r)
{
    ngx_http_core_loc_conf_t  *clcf;
    clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
    if (clcf->post_action.data == NULL) {
        return NGX_DECLINED;
    }
    if (r->post_action && r->uri_changes == 0) {
        return NGX_DECLINED;
    }
    ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
                   "post action: \"%V\"", &clcf->post_action);
    r->main->count--;
    r->http_version = NGX_HTTP_VERSION_9;
    r->header_only = 1;
    r->post_action = 1;
    r->read_event_handler = ngx_http_block_reading;
    if (clcf->post_action.data[0] == '/') {
        ngx_http_internal_redirect(r, &clcf->post_action, NULL);
    } else {
        ngx_http_named_location(r, &clcf->post_action);
    }
    return NGX_OK;
}
['static ngx_int_t\nngx_http_process_request_header(ngx_http_request_t *r)\n{\n    if (r->headers_in.server.len == 0\n        && ngx_http_set_virtual_server(r, &r->headers_in.server)\n           == NGX_ERROR)\n    {\n        return NGX_ERROR;\n    }\n    if (r->headers_in.host == NULL && r->http_version > NGX_HTTP_VERSION_10) {\n        ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,\n                   "client sent HTTP/1.1 request without \\"Host\\" header");\n        ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST);\n        return NGX_ERROR;\n    }\n    if (r->headers_in.content_length) {\n        r->headers_in.content_length_n =\n                            ngx_atoof(r->headers_in.content_length->value.data,\n                                      r->headers_in.content_length->value.len);\n        if (r->headers_in.content_length_n == NGX_ERROR) {\n            ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,\n                          "client sent invalid \\"Content-Length\\" header");\n            ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST);\n            return NGX_ERROR;\n        }\n    }\n    if (r->method & NGX_HTTP_TRACE) {\n        ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,\n                      "client sent TRACE method");\n        ngx_http_finalize_request(r, NGX_HTTP_NOT_ALLOWED);\n        return NGX_ERROR;\n    }\n    if (r->headers_in.transfer_encoding) {\n        if (r->headers_in.transfer_encoding->value.len == 7\n            && ngx_strncasecmp(r->headers_in.transfer_encoding->value.data,\n                               (u_char *) "chunked", 7) == 0)\n        {\n            r->headers_in.content_length = NULL;\n            r->headers_in.content_length_n = -1;\n            r->headers_in.chunked = 1;\n        } else if (r->headers_in.transfer_encoding->value.len != 8\n            || ngx_strncasecmp(r->headers_in.transfer_encoding->value.data,\n                               (u_char *) "identity", 8) != 0)\n        {\n            ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,\n                          "client sent unknown \\"Transfer-Encoding\\": \\"%V\\"",\n                          &r->headers_in.transfer_encoding->value);\n            ngx_http_finalize_request(r, NGX_HTTP_NOT_IMPLEMENTED);\n            return NGX_ERROR;\n        }\n    }\n    if (r->headers_in.connection_type == NGX_HTTP_CONNECTION_KEEP_ALIVE) {\n        if (r->headers_in.keep_alive) {\n            r->headers_in.keep_alive_n =\n                            ngx_atotm(r->headers_in.keep_alive->value.data,\n                                      r->headers_in.keep_alive->value.len);\n        }\n    }\n    return NGX_OK;\n}', 'void\nngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)\n{\n    ngx_connection_t          *c;\n    ngx_http_request_t        *pr;\n    ngx_http_core_loc_conf_t  *clcf;\n    c = r->connection;\n    ngx_log_debug5(NGX_LOG_DEBUG_HTTP, c->log, 0,\n                   "http finalize request: %d, \\"%V?%V\\" a:%d, c:%d",\n                   rc, &r->uri, &r->args, r == c->data, r->main->count);\n    if (rc == NGX_DONE) {\n        ngx_http_finalize_connection(r);\n        return;\n    }\n    if (rc == NGX_OK && r->filter_finalize) {\n        c->error = 1;\n    }\n    if (rc == NGX_DECLINED) {\n        r->content_handler = NULL;\n        r->write_event_handler = ngx_http_core_run_phases;\n        ngx_http_core_run_phases(r);\n        return;\n    }\n    if (r != r->main && r->post_subrequest) {\n        rc = r->post_subrequest->handler(r, r->post_subrequest->data, rc);\n    }\n    if (rc == NGX_ERROR\n        || rc == NGX_HTTP_REQUEST_TIME_OUT\n        || rc == NGX_HTTP_CLIENT_CLOSED_REQUEST\n        || c->error)\n    {\n        if (ngx_http_post_action(r) == NGX_OK) {\n            return;\n        }\n        if (r->main->blocked) {\n            r->write_event_handler = ngx_http_request_finalizer;\n        }\n        ngx_http_terminate_request(r, rc);\n        return;\n    }\n    if (rc >= NGX_HTTP_SPECIAL_RESPONSE\n        || rc == NGX_HTTP_CREATED\n        || rc == NGX_HTTP_NO_CONTENT)\n    {\n        if (rc == NGX_HTTP_CLOSE) {\n            ngx_http_terminate_request(r, rc);\n            return;\n        }\n        if (r == r->main) {\n            if (c->read->timer_set) {\n                ngx_del_timer(c->read);\n            }\n            if (c->write->timer_set) {\n                ngx_del_timer(c->write);\n            }\n        }\n        c->read->handler = ngx_http_request_handler;\n        c->write->handler = ngx_http_request_handler;\n        ngx_http_finalize_request(r, ngx_http_special_response_handler(r, rc));\n        return;\n    }\n    if (r != r->main) {\n        if (r->buffered || r->postponed) {\n            if (ngx_http_set_write_handler(r) != NGX_OK) {\n                ngx_http_terminate_request(r, 0);\n            }\n            return;\n        }\n        pr = r->parent;\n        if (r == c->data) {\n            r->main->count--;\n            r->main->subrequests++;\n            if (!r->logged) {\n                clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);\n                if (clcf->log_subrequest) {\n                    ngx_http_log_request(r);\n                }\n                r->logged = 1;\n            } else {\n                ngx_log_error(NGX_LOG_ALERT, c->log, 0,\n                              "subrequest: \\"%V?%V\\" logged again",\n                              &r->uri, &r->args);\n            }\n            r->done = 1;\n            if (pr->postponed && pr->postponed->request == r) {\n                pr->postponed = pr->postponed->next;\n            }\n            c->data = pr;\n        } else {\n            ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0,\n                           "http finalize non-active request: \\"%V?%V\\"",\n                           &r->uri, &r->args);\n            r->write_event_handler = ngx_http_request_finalizer;\n            if (r->waited) {\n                r->done = 1;\n            }\n        }\n        if (ngx_http_post_request(pr, NULL) != NGX_OK) {\n            r->main->count++;\n            ngx_http_terminate_request(r, 0);\n            return;\n        }\n        ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0,\n                       "http wake parent request: \\"%V?%V\\"",\n                       &pr->uri, &pr->args);\n        return;\n    }\n    if (r->buffered || c->buffered || r->postponed || r->blocked) {\n        if (ngx_http_set_write_handler(r) != NGX_OK) {\n            ngx_http_terminate_request(r, 0);\n        }\n        return;\n    }\n    if (r != c->data) {\n        ngx_log_error(NGX_LOG_ALERT, c->log, 0,\n                      "http finalize non-active request: \\"%V?%V\\"",\n                      &r->uri, &r->args);\n        return;\n    }\n    r->done = 1;\n    r->write_event_handler = ngx_http_request_empty_handler;\n    if (!r->post_action) {\n        r->request_complete = 1;\n    }\n    if (ngx_http_post_action(r) == NGX_OK) {\n        return;\n    }\n    if (c->read->timer_set) {\n        ngx_del_timer(c->read);\n    }\n    if (c->write->timer_set) {\n        c->write->delayed = 0;\n        ngx_del_timer(c->write);\n    }\n    if (c->read->eof) {\n        ngx_http_close_request(r, 0);\n        return;\n    }\n    ngx_http_finalize_connection(r);\n}', 'static ngx_int_t\nngx_http_post_action(ngx_http_request_t *r)\n{\n    ngx_http_core_loc_conf_t  *clcf;\n    clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);\n    if (clcf->post_action.data == NULL) {\n        return NGX_DECLINED;\n    }\n    if (r->post_action && r->uri_changes == 0) {\n        return NGX_DECLINED;\n    }\n    ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,\n                   "post action: \\"%V\\"", &clcf->post_action);\n    r->main->count--;\n    r->http_version = NGX_HTTP_VERSION_9;\n    r->header_only = 1;\n    r->post_action = 1;\n    r->read_event_handler = ngx_http_block_reading;\n    if (clcf->post_action.data[0] == \'/\') {\n        ngx_http_internal_redirect(r, &clcf->post_action, NULL);\n    } else {\n        ngx_http_named_location(r, &clcf->post_action);\n    }\n    return NGX_OK;\n}']