src/http/ngx_http_core_module.c:2798: error: Integer Overflow L2
  ([0, 9223372036854775800] + [0, 9]):signed64 by call to `ngx_http_get_forwarded_addr_internal`.

src/http/ngx_http_core_module.c:2798:14: Call
2796. 
2797.     while (i-- > 0) {
2798.         rc = ngx_http_get_forwarded_addr_internal(r, addr, h[i]->value.data,
                   ^
2799.                                                   h[i]->value.len, proxies,
2800.                                                   recursive);

src/http/ngx_http_core_module.c:2822:1: Parameter `*xff`
  2820. 
  2821. 
  2822. static ngx_int_t
        ^
  2823. ngx_http_get_forwarded_addr_internal(ngx_http_request_t *r, ngx_addr_t *addr,
  2824.     u_char *xff, size_t xfflen, ngx_array_t *proxies, int recursive)

src/http/ngx_http_core_module.c:2798:14: Call
2796. 
2797.     while (i-- > 0) {
2798.         rc = ngx_http_get_forwarded_addr_internal(r, addr, h[i]->value.data,
                   ^
2799.                                                   h[i]->value.len, proxies,
2800.                                                   recursive);

src/http/ngx_http_core_module.c:2822:1: Parameter `*xff`
  2820. 
  2821. 
  2822. static ngx_int_t
        ^
  2823. ngx_http_get_forwarded_addr_internal(ngx_http_request_t *r, ngx_addr_t *addr,
  2824.     u_char *xff, size_t xfflen, ngx_array_t *proxies, int recursive)

src/http/ngx_http_core_module.c:2798:14: Call
2796. 
2797.     while (i-- > 0) {
2798.         rc = ngx_http_get_forwarded_addr_internal(r, addr, h[i]->value.data,
                   ^
2799.                                                   h[i]->value.len, proxies,
2800.                                                   recursive);

src/http/ngx_http_core_module.c:2822:1: Parameter `*xff`
  2820. 
  2821. 
  2822. static ngx_int_t
        ^
  2823. ngx_http_get_forwarded_addr_internal(ngx_http_request_t *r, ngx_addr_t *addr,
  2824.     u_char *xff, size_t xfflen, ngx_array_t *proxies, int recursive)

src/http/ngx_http_core_module.c:2847:9: Call
  2845.     }
  2846. 
  2847.     if (ngx_parse_addr_port(r->pool, &paddr, p, xfflen - (p - xff)) != NGX_OK) {
                ^
  2848.         return NGX_DECLINED;
  2849.     }

src/core/ngx_inet.c:615:1: Parameter `*text`
    613. 
    614. 
    615. ngx_int_t
         ^
    616. ngx_parse_addr_port(ngx_pool_t *pool, ngx_addr_t *addr, u_char *text,
    617.     size_t len)

src/core/ngx_inet.c:623:10: Call
    621.     ngx_int_t   rc, port;
    622. 
    623.     rc = ngx_parse_addr(pool, addr, text, len);
                  ^
    624. 
    625.     if (rc != NGX_DECLINED) {

src/core/ngx_inet.c:555:1: Parameter `*text`
      553. 
      554. 
      555. ngx_int_t
           ^
      556. ngx_parse_addr(ngx_pool_t *pool, ngx_addr_t *addr, u_char *text, size_t len)
      557. {

src/core/ngx_inet.c:657:12: Call
    655.     plen = last - p;
    656. 
    657.     port = ngx_atoi(p, plen);
                    ^
    658. 
    659.     if (port < 1 || port > 65535) {

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_http_get_forwarded_addr_internal` 
      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;
}
['ngx_int_t\nngx_http_get_forwarded_addr(ngx_http_request_t *r, ngx_addr_t *addr,\n    ngx_array_t *headers, ngx_str_t *value, ngx_array_t *proxies,\n    int recursive)\n{\n    ngx_int_t          rc;\n    ngx_uint_t         i, found;\n    ngx_table_elt_t  **h;\n    if (headers == NULL) {\n        return ngx_http_get_forwarded_addr_internal(r, addr, value->data,\n                                                    value->len, proxies,\n                                                    recursive);\n    }\n    i = headers->nelts;\n    h = headers->elts;\n    rc = NGX_DECLINED;\n    found = 0;\n    while (i-- > 0) {\n        rc = ngx_http_get_forwarded_addr_internal(r, addr, h[i]->value.data,\n                                                  h[i]->value.len, proxies,\n                                                  recursive);\n        if (!recursive) {\n            break;\n        }\n        if (rc == NGX_DECLINED && found) {\n            rc = NGX_DONE;\n            break;\n        }\n        if (rc != NGX_OK) {\n            break;\n        }\n        found = 1;\n    }\n    return rc;\n}', "static ngx_int_t\nngx_http_get_forwarded_addr_internal(ngx_http_request_t *r, ngx_addr_t *addr,\n    u_char *xff, size_t xfflen, ngx_array_t *proxies, int recursive)\n{\n    u_char      *p;\n    ngx_int_t    rc;\n    ngx_addr_t   paddr;\n    if (ngx_cidr_match(addr->sockaddr, proxies) != NGX_OK) {\n        return NGX_DECLINED;\n    }\n    for (p = xff + xfflen - 1; p > xff; p--, xfflen--) {\n        if (*p != ' ' && *p != ',') {\n            break;\n        }\n    }\n    for (   ; p > xff; p--) {\n        if (*p == ' ' || *p == ',') {\n            p++;\n            break;\n        }\n    }\n    if (ngx_parse_addr_port(r->pool, &paddr, p, xfflen - (p - xff)) != NGX_OK) {\n        return NGX_DECLINED;\n    }\n    *addr = paddr;\n    if (recursive && p > xff) {\n        rc = ngx_http_get_forwarded_addr_internal(r, addr, xff, p - 1 - xff,\n                                                  proxies, 1);\n        if (rc == NGX_DECLINED) {\n            return NGX_DONE;\n        }\n        return rc;\n    }\n    return NGX_OK;\n}", "ngx_int_t\nngx_parse_addr_port(ngx_pool_t *pool, ngx_addr_t *addr, u_char *text,\n    size_t len)\n{\n    u_char     *p, *last;\n    size_t      plen;\n    ngx_int_t   rc, port;\n    rc = ngx_parse_addr(pool, addr, text, len);\n    if (rc != NGX_DECLINED) {\n        return rc;\n    }\n    last = text + len;\n#if (NGX_HAVE_INET6)\n    if (len && text[0] == '[') {\n        p = ngx_strlchr(text, last, ']');\n        if (p == NULL || p == last - 1 || *++p != ':') {\n            return NGX_DECLINED;\n        }\n        text++;\n        len -= 2;\n    } else\n#endif\n    {\n        p = ngx_strlchr(text, last, ':');\n        if (p == NULL) {\n            return NGX_DECLINED;\n        }\n    }\n    p++;\n    plen = last - p;\n    port = ngx_atoi(p, plen);\n    if (port < 1 || port > 65535) {\n        return NGX_DECLINED;\n    }\n    len -= plen + 1;\n    rc = ngx_parse_addr(pool, addr, text, len);\n    if (rc != NGX_OK) {\n        return rc;\n    }\n    ngx_inet_set_port(addr->sockaddr, (in_port_t) port);\n    return NGX_OK;\n}", 'ngx_int_t\nngx_parse_addr(ngx_pool_t *pool, ngx_addr_t *addr, u_char *text, size_t len)\n{\n    in_addr_t             inaddr;\n    ngx_uint_t            family;\n    struct sockaddr_in   *sin;\n#if (NGX_HAVE_INET6)\n    struct in6_addr       inaddr6;\n    struct sockaddr_in6  *sin6;\n    ngx_memzero(&inaddr6, sizeof(struct in6_addr));\n#endif\n    inaddr = ngx_inet_addr(text, len);\n    if (inaddr != INADDR_NONE) {\n        family = AF_INET;\n        len = sizeof(struct sockaddr_in);\n#if (NGX_HAVE_INET6)\n    } else if (ngx_inet6_addr(text, len, inaddr6.s6_addr) == NGX_OK) {\n        family = AF_INET6;\n        len = sizeof(struct sockaddr_in6);\n#endif\n    } else {\n        return NGX_DECLINED;\n    }\n    addr->sockaddr = ngx_pcalloc(pool, len);\n    if (addr->sockaddr == NULL) {\n        return NGX_ERROR;\n    }\n    addr->sockaddr->sa_family = (u_char) family;\n    addr->socklen = len;\n    switch (family) {\n#if (NGX_HAVE_INET6)\n    case AF_INET6:\n        sin6 = (struct sockaddr_in6 *) addr->sockaddr;\n        ngx_memcpy(sin6->sin6_addr.s6_addr, inaddr6.s6_addr, 16);\n        break;\n#endif\n    default:\n        sin = (struct sockaddr_in *) addr->sockaddr;\n        sin->sin_addr.s_addr = inaddr;\n        break;\n    }\n    return NGX_OK;\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}"]