src/http/modules/ngx_http_fastcgi_module.c:1641: error: Integer Overflow L2
  ([0, 9223372036854775800] + [0, 9]):signed64 by call to `ngx_atoi`.

src/http/modules/ngx_http_fastcgi_module.c:1513:18: Unknown value from: ngx_http_parse_header_line
1511.             part_end = u->buffer.last;
1512. 
1513.             rc = ngx_http_parse_header_line(r, &u->buffer, 1);
                       ^
1514. 
1515.             ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,

src/http/modules/ngx_http_fastcgi_module.c:1641:30: Call
1639.                     status_line = &u->headers_in.status->value;
1640. 
1641.                     status = ngx_atoi(status_line->data, 3);
                                   ^
1642. 
1643.                     if (status == NGX_ERROR) {

src/core/ngx_string.c:910:5: <LHS trace>
908.     }
909. 
910.     cutoff = NGX_MAX_INT_T_VALUE / 10;
         ^
911.     cutlim = NGX_MAX_INT_T_VALUE % 10;
912. 

src/core/ngx_string.c:910:5: Assignment
  908.     }
  909. 
  910.     cutoff = NGX_MAX_INT_T_VALUE / 10;
           ^
  911.     cutlim = NGX_MAX_INT_T_VALUE % 10;
  912. 

src/core/ngx_string.c:901:1: <RHS trace>
899. 
900. 
901. ngx_int_t
     ^
902. ngx_atoi(u_char *line, size_t n)
903. {

src/core/ngx_string.c:901:1: Parameter `*line`
  899. 
  900. 
  901. ngx_int_t
       ^
  902. ngx_atoi(u_char *line, size_t n)
  903. {

src/core/ngx_string.c:922:9: Binary operation: ([0, 9223372036854775800] + [0, 9]):signed64 by call to `ngx_atoi` 
  920.         }
  921. 
  922.         value = value * 10 + (*line - '0');
               ^
  923.     }
  924. 

ngx_int_t
ngx_atoi(u_char *line, size_t n)
{
    ngx_int_t  value, cutoff, cutlim;
    if (n == 0) {
        return NGX_ERROR;
    }
    cutoff = NGX_MAX_INT_T_VALUE / 10;
    cutlim = NGX_MAX_INT_T_VALUE % 10;
    for (value = 0; n--; line++) {
        if (*line < '0' || *line > '9') {
            return NGX_ERROR;
        }
        if (value >= cutoff && (value > cutoff || *line - '0' > cutlim)) {
            return NGX_ERROR;
        }
        value = value * 10 + (*line - '0');
    }
    return value;
}
['static ngx_int_t\nngx_http_fastcgi_process_header(ngx_http_request_t *r)\n{\n    u_char                         *p, *msg, *start, *last,\n                                   *part_start, *part_end;\n    size_t                          size;\n    ngx_str_t                      *status_line, *pattern;\n    ngx_int_t                       rc, status;\n    ngx_buf_t                       buf;\n    ngx_uint_t                      i;\n    ngx_table_elt_t                *h;\n    ngx_http_upstream_t            *u;\n    ngx_http_fastcgi_ctx_t         *f;\n    ngx_http_upstream_header_t     *hh;\n    ngx_http_fastcgi_loc_conf_t    *flcf;\n    ngx_http_fastcgi_split_part_t  *part;\n    ngx_http_upstream_main_conf_t  *umcf;\n    f = ngx_http_get_module_ctx(r, ngx_http_fastcgi_module);\n    umcf = ngx_http_get_module_main_conf(r, ngx_http_upstream_module);\n    u = r->upstream;\n    for ( ;; ) {\n        if (f->state < ngx_http_fastcgi_st_data) {\n            f->pos = u->buffer.pos;\n            f->last = u->buffer.last;\n            rc = ngx_http_fastcgi_process_record(r, f);\n            u->buffer.pos = f->pos;\n            u->buffer.last = f->last;\n            if (rc == NGX_AGAIN) {\n                return NGX_AGAIN;\n            }\n            if (rc == NGX_ERROR) {\n                return NGX_HTTP_UPSTREAM_INVALID_HEADER;\n            }\n            if (f->type != NGX_HTTP_FASTCGI_STDOUT\n                && f->type != NGX_HTTP_FASTCGI_STDERR)\n            {\n                ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,\n                              "upstream sent unexpected FastCGI record: %d",\n                              f->type);\n                return NGX_HTTP_UPSTREAM_INVALID_HEADER;\n            }\n            if (f->type == NGX_HTTP_FASTCGI_STDOUT && f->length == 0) {\n                ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,\n                              "upstream prematurely closed FastCGI stdout");\n                return NGX_HTTP_UPSTREAM_INVALID_HEADER;\n            }\n        }\n        if (f->state == ngx_http_fastcgi_st_padding) {\n            if (u->buffer.pos + f->padding < u->buffer.last) {\n                f->state = ngx_http_fastcgi_st_version;\n                u->buffer.pos += f->padding;\n                continue;\n            }\n            if (u->buffer.pos + f->padding == u->buffer.last) {\n                f->state = ngx_http_fastcgi_st_version;\n                u->buffer.pos = u->buffer.last;\n                return NGX_AGAIN;\n            }\n            f->padding -= u->buffer.last - u->buffer.pos;\n            u->buffer.pos = u->buffer.last;\n            return NGX_AGAIN;\n        }\n        if (f->type == NGX_HTTP_FASTCGI_STDERR) {\n            if (f->length) {\n                msg = u->buffer.pos;\n                if (u->buffer.pos + f->length <= u->buffer.last) {\n                    u->buffer.pos += f->length;\n                    f->length = 0;\n                    f->state = ngx_http_fastcgi_st_padding;\n                } else {\n                    f->length -= u->buffer.last - u->buffer.pos;\n                    u->buffer.pos = u->buffer.last;\n                }\n                for (p = u->buffer.pos - 1; msg < p; p--) {\n                    if (*p != LF && *p != CR && *p != \'.\' && *p != \' \') {\n                        break;\n                    }\n                }\n                p++;\n                ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,\n                              "FastCGI sent in stderr: \\"%*s\\"", p - msg, msg);\n                flcf = ngx_http_get_module_loc_conf(r, ngx_http_fastcgi_module);\n                if (flcf->catch_stderr) {\n                    pattern = flcf->catch_stderr->elts;\n                    for (i = 0; i < flcf->catch_stderr->nelts; i++) {\n                        if (ngx_strnstr(msg, (char *) pattern[i].data,\n                                        p - msg)\n                            != NULL)\n                        {\n                            return NGX_HTTP_UPSTREAM_INVALID_HEADER;\n                        }\n                    }\n                }\n                if (u->buffer.pos == u->buffer.last) {\n                    if (!f->fastcgi_stdout) {\n#if (NGX_HTTP_CACHE)\n                        if (r->cache) {\n                            u->buffer.pos = u->buffer.start\n                                                     + r->cache->header_start;\n                        } else {\n                            u->buffer.pos = u->buffer.start;\n                        }\n#else\n                        u->buffer.pos = u->buffer.start;\n#endif\n                        u->buffer.last = u->buffer.pos;\n                        f->large_stderr = 1;\n                    }\n                    return NGX_AGAIN;\n                }\n            } else {\n                f->state = ngx_http_fastcgi_st_padding;\n            }\n            continue;\n        }\n#if (NGX_HTTP_CACHE)\n        if (f->large_stderr && r->cache) {\n            u_char                     *start;\n            ssize_t                     len;\n            ngx_http_fastcgi_header_t  *fh;\n            start = u->buffer.start + r->cache->header_start;\n            len = u->buffer.pos - start - 2 * sizeof(ngx_http_fastcgi_header_t);\n            if (len >= 0) {\n                fh = (ngx_http_fastcgi_header_t *) start;\n                fh->version = 1;\n                fh->type = NGX_HTTP_FASTCGI_STDERR;\n                fh->request_id_hi = 0;\n                fh->request_id_lo = 1;\n                fh->content_length_hi = (u_char) ((len >> 8) & 0xff);\n                fh->content_length_lo = (u_char) (len & 0xff);\n                fh->padding_length = 0;\n                fh->reserved = 0;\n            } else {\n                r->cache->header_start += u->buffer.pos - start\n                                           - sizeof(ngx_http_fastcgi_header_t);\n            }\n            f->large_stderr = 0;\n        }\n#endif\n        f->fastcgi_stdout = 1;\n        start = u->buffer.pos;\n        if (u->buffer.pos + f->length < u->buffer.last) {\n            last = u->buffer.last;\n            u->buffer.last = u->buffer.pos + f->length;\n        } else {\n            last = NULL;\n        }\n        for ( ;; ) {\n            part_start = u->buffer.pos;\n            part_end = u->buffer.last;\n            rc = ngx_http_parse_header_line(r, &u->buffer, 1);\n            ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,\n                           "http fastcgi parser: %d", rc);\n            if (rc == NGX_AGAIN) {\n                break;\n            }\n            if (rc == NGX_OK) {\n                h = ngx_list_push(&u->headers_in.headers);\n                if (h == NULL) {\n                    return NGX_ERROR;\n                }\n                if (f->split_parts && f->split_parts->nelts) {\n                    part = f->split_parts->elts;\n                    size = u->buffer.pos - part_start;\n                    for (i = 0; i < f->split_parts->nelts; i++) {\n                        size += part[i].end - part[i].start;\n                    }\n                    p = ngx_pnalloc(r->pool, size);\n                    if (p == NULL) {\n                        return NGX_ERROR;\n                    }\n                    buf.pos = p;\n                    for (i = 0; i < f->split_parts->nelts; i++) {\n                        p = ngx_cpymem(p, part[i].start,\n                                       part[i].end - part[i].start);\n                    }\n                    p = ngx_cpymem(p, part_start, u->buffer.pos - part_start);\n                    buf.last = p;\n                    f->split_parts->nelts = 0;\n                    rc = ngx_http_parse_header_line(r, &buf, 1);\n                    if (rc != NGX_OK) {\n                        ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,\n                                      "invalid header after joining "\n                                      "FastCGI records");\n                        return NGX_ERROR;\n                    }\n                    h->key.len = r->header_name_end - r->header_name_start;\n                    h->key.data = r->header_name_start;\n                    h->key.data[h->key.len] = \'\\0\';\n                    h->value.len = r->header_end - r->header_start;\n                    h->value.data = r->header_start;\n                    h->value.data[h->value.len] = \'\\0\';\n                    h->lowcase_key = ngx_pnalloc(r->pool, h->key.len);\n                    if (h->lowcase_key == NULL) {\n                        return NGX_ERROR;\n                    }\n                } else {\n                    h->key.len = r->header_name_end - r->header_name_start;\n                    h->value.len = r->header_end - r->header_start;\n                    h->key.data = ngx_pnalloc(r->pool,\n                                              h->key.len + 1 + h->value.len + 1\n                                              + h->key.len);\n                    if (h->key.data == NULL) {\n                        return NGX_ERROR;\n                    }\n                    h->value.data = h->key.data + h->key.len + 1;\n                    h->lowcase_key = h->key.data + h->key.len + 1\n                                     + h->value.len + 1;\n                    ngx_memcpy(h->key.data, r->header_name_start, h->key.len);\n                    h->key.data[h->key.len] = \'\\0\';\n                    ngx_memcpy(h->value.data, r->header_start, h->value.len);\n                    h->value.data[h->value.len] = \'\\0\';\n                }\n                h->hash = r->header_hash;\n                if (h->key.len == r->lowcase_index) {\n                    ngx_memcpy(h->lowcase_key, r->lowcase_header, h->key.len);\n                } else {\n                    ngx_strlow(h->lowcase_key, h->key.data, h->key.len);\n                }\n                hh = ngx_hash_find(&umcf->headers_in_hash, h->hash,\n                                   h->lowcase_key, h->key.len);\n                if (hh && hh->handler(r, h, hh->offset) != NGX_OK) {\n                    return NGX_ERROR;\n                }\n                ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,\n                               "http fastcgi header: \\"%V: %V\\"",\n                               &h->key, &h->value);\n                if (u->buffer.pos < u->buffer.last) {\n                    continue;\n                }\n                break;\n            }\n            if (rc == NGX_HTTP_PARSE_HEADER_DONE) {\n                ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,\n                               "http fastcgi header done");\n                if (u->headers_in.status) {\n                    status_line = &u->headers_in.status->value;\n                    status = ngx_atoi(status_line->data, 3);\n                    if (status == NGX_ERROR) {\n                        ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,\n                                      "upstream sent invalid status \\"%V\\"",\n                                      status_line);\n                        return NGX_HTTP_UPSTREAM_INVALID_HEADER;\n                    }\n                    u->headers_in.status_n = status;\n                    u->headers_in.status_line = *status_line;\n                } else if (u->headers_in.location) {\n                    u->headers_in.status_n = 302;\n                    ngx_str_set(&u->headers_in.status_line,\n                                "302 Moved Temporarily");\n                } else {\n                    u->headers_in.status_n = 200;\n                    ngx_str_set(&u->headers_in.status_line, "200 OK");\n                }\n                if (u->state && u->state->status == 0) {\n                    u->state->status = u->headers_in.status_n;\n                }\n                break;\n            }\n            ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,\n                          "upstream sent invalid header");\n            return NGX_HTTP_UPSTREAM_INVALID_HEADER;\n        }\n        if (last) {\n            u->buffer.last = last;\n        }\n        f->length -= u->buffer.pos - start;\n        if (f->length == 0) {\n            f->state = ngx_http_fastcgi_st_padding;\n        }\n        if (rc == NGX_HTTP_PARSE_HEADER_DONE) {\n            return NGX_OK;\n        }\n        if (rc == NGX_OK) {\n            continue;\n        }\n        ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,\n                       "upstream split a header line in FastCGI records");\n        if (f->split_parts == NULL) {\n            f->split_parts = ngx_array_create(r->pool, 1,\n                                        sizeof(ngx_http_fastcgi_split_part_t));\n            if (f->split_parts == NULL) {\n                return NGX_ERROR;\n            }\n        }\n        part = ngx_array_push(f->split_parts);\n        if (part == NULL) {\n            return NGX_ERROR;\n        }\n        part->start = part_start;\n        part->end = part_end;\n        if (u->buffer.pos < u->buffer.last) {\n            continue;\n        }\n        return NGX_AGAIN;\n    }\n}', "ngx_int_t\nngx_atoi(u_char *line, size_t n)\n{\n    ngx_int_t  value, cutoff, cutlim;\n    if (n == 0) {\n        return NGX_ERROR;\n    }\n    cutoff = NGX_MAX_INT_T_VALUE / 10;\n    cutlim = NGX_MAX_INT_T_VALUE % 10;\n    for (value = 0; n--; line++) {\n        if (*line < '0' || *line > '9') {\n            return NGX_ERROR;\n        }\n        if (value >= cutoff && (value > cutoff || *line - '0' > cutlim)) {\n            return NGX_ERROR;\n        }\n        value = value * 10 + (*line - '0');\n    }\n    return value;\n}"]