src/http/ngx_http_core_module.c:2847: error: Integer Overflow L2
  ([1, +oo] - 2):unsigned64 by call to `ngx_parse_addr_port`.

src/http/ngx_http_core_module.c:2822:1: Parameter `xfflen`
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: <LHS trace>
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:615:1: Parameter `len`
  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:641:9: Binary operation: ([1, +oo] - 2):unsigned64 by call to `ngx_parse_addr_port` 
  639. 
  640.         text++;
  641.         len -= 2;
               ^
  642. 
  643.     } else

ngx_int_t
ngx_parse_addr_port(ngx_pool_t *pool, ngx_addr_t *addr, u_char *text,
    size_t len)
{
    u_char     *p, *last;
    size_t      plen;
    ngx_int_t   rc, port;
    rc = ngx_parse_addr(pool, addr, text, len);
    if (rc != NGX_DECLINED) {
        return rc;
    }
    last = text + len;
#if (NGX_HAVE_INET6)
    if (len && text[0] == '[') {
        p = ngx_strlchr(text, last, ']');
        if (p == NULL || p == last - 1 || *++p != ':') {
            return NGX_DECLINED;
        }
        text++;
        len -= 2;
    } else
#endif
    {
        p = ngx_strlchr(text, last, ':');
        if (p == NULL) {
            return NGX_DECLINED;
        }
    }
    p++;
    plen = last - p;
    port = ngx_atoi(p, plen);
    if (port < 1 || port > 65535) {
        return NGX_DECLINED;
    }
    len -= plen + 1;
    rc = ngx_parse_addr(pool, addr, text, len);
    if (rc != NGX_OK) {
        return rc;
    }
    ngx_inet_set_port(addr->sockaddr, (in_port_t) port);
    return NGX_OK;
}
["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}"]