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

src/http/ngx_http_core_module.c:3781:5: Unknown value from: __infer_skip
3779.     value = cf->args->elts;
3780. 
3781.     ngx_memzero(&u, sizeof(ngx_url_t));
          ^
3782. 
3783.     u.url = value[1];

src/http/ngx_http_core_module.c:3787:9: Call
3785.     u.default_port = 80;
3786. 
3787.     if (ngx_parse_url(cf->pool, &u) != NGX_OK) {
              ^
3788.         if (u.err) {
3789.             ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,

src/core/ngx_inet.c:683:1: Parameter `*u->url.data`
  681. 
  682. 
  683. ngx_int_t
       ^
  684. ngx_parse_url(ngx_pool_t *pool, ngx_url_t *u)
  685. {

src/core/ngx_inet.c:700:12: Call
  698.     }
  699. 
  700.     return ngx_parse_inet_url(pool, u);
                  ^
  701. }
  702. 

src/core/ngx_inet.c:782:1: Parameter `*u->url.data`
    780. 
    781. 
    782. static ngx_int_t
         ^
    783. ngx_parse_inet_url(ngx_pool_t *pool, ngx_url_t *u)
    784. {

src/core/ngx_inet.c:800:12: Call
    798.     last = host + u->url.len;
    799. 
    800.     port = ngx_strlchr(host, last, ':');
                    ^
    801. 
    802.     uri = ngx_strlchr(host, last, '/');

src/core/ngx_string.h:67:1: Parameter `c`
      65. #define ngx_strchr(s1, c)   strchr((const char *) s1, (int) c)
      66. 
      67. static ngx_inline u_char *
          ^
      68. ngx_strlchr(u_char *p, u_char *last, u_char c)
      69. {

src/core/ngx_inet.c:802:11: Call
    800.     port = ngx_strlchr(host, last, ':');
    801. 
    802.     uri = ngx_strlchr(host, last, '/');
                   ^
    803. 
    804.     args = ngx_strlchr(host, last, '?');

src/core/ngx_string.h:67:1: Parameter `c`
      65. #define ngx_strchr(s1, c)   strchr((const char *) s1, (int) c)
      66. 
      67. static ngx_inline u_char *
          ^
      68. ngx_strlchr(u_char *p, u_char *last, u_char c)
      69. {

src/core/ngx_inet.c:804:12: Call
    802.     uri = ngx_strlchr(host, last, '/');
    803. 
    804.     args = ngx_strlchr(host, last, '?');
                    ^
    805. 
    806.     if (args) {

src/core/ngx_string.h:67:1: Parameter `c`
      65. #define ngx_strchr(s1, c)   strchr((const char *) s1, (int) c)
      66. 
      67. static ngx_inline u_char *
          ^
      68. ngx_strlchr(u_char *p, u_char *last, u_char c)
      69. {

src/core/ngx_inet.c:834:20: Call
    832. 
    833.         if (u->listen) {
    834.             dash = ngx_strlchr(port, last, '-');
                            ^
    835. 
    836.             if (dash) {

src/core/ngx_string.h:67:1: Parameter `c`
      65. #define ngx_strchr(s1, c)   strchr((const char *) s1, (int) c)
      66. 
      67. static ngx_inline u_char *
          ^
      68. ngx_strlchr(u_char *p, u_char *last, u_char c)
      69. {

src/core/ngx_inet.c:839:21: Call
    837.                 dash++;
    838. 
    839.                 n = ngx_atoi(dash, last - dash);
                             ^
    840. 
    841.                 if (n < 1 || n > 65535) {

src/core/ngx_string.c:926:5: <LHS trace>
924.     }
925. 
926.     cutoff = NGX_MAX_INT_T_VALUE / 10;
         ^
927.     cutlim = NGX_MAX_INT_T_VALUE % 10;
928. 

src/core/ngx_string.c:926:5: Assignment
      924.     }
      925. 
      926.     cutoff = NGX_MAX_INT_T_VALUE / 10;
               ^
      927.     cutlim = NGX_MAX_INT_T_VALUE % 10;
      928. 

src/core/ngx_string.c:917:1: <RHS trace>
915. 
916. 
917. ngx_int_t
     ^
918. ngx_atoi(u_char *line, size_t n)
919. {

src/core/ngx_string.c:917:1: Parameter `*line`
      915. 
      916. 
      917. ngx_int_t
           ^
      918. ngx_atoi(u_char *line, size_t n)
      919. {

src/core/ngx_string.c:938:9: Binary operation: ([0, 9223372036854775800] + [0, 9]):signed64 by call to `ngx_parse_url` 
      936.         }
      937. 
      938.         value = value * 10 + (*line - '0');
                   ^
      939.     }
      940. 

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 char *\nngx_http_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)\n{\n    ngx_http_core_srv_conf_t *cscf = conf;\n    ngx_str_t              *value, size;\n    ngx_url_t               u;\n    ngx_uint_t              n;\n    ngx_http_listen_opt_t   lsopt;\n    cscf->listen = 1;\n    value = cf->args->elts;\n    ngx_memzero(&u, sizeof(ngx_url_t));\n    u.url = value[1];\n    u.listen = 1;\n    u.default_port = 80;\n    if (ngx_parse_url(cf->pool, &u) != NGX_OK) {\n        if (u.err) {\n            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                               "%s in \\"%V\\" of the \\"listen\\" directive",\n                               u.err, &u.url);\n        }\n        return NGX_CONF_ERROR;\n    }\n    ngx_memzero(&lsopt, sizeof(ngx_http_listen_opt_t));\n    lsopt.backlog = NGX_LISTEN_BACKLOG;\n    lsopt.rcvbuf = -1;\n    lsopt.sndbuf = -1;\n#if (NGX_HAVE_SETFIB)\n    lsopt.setfib = -1;\n#endif\n#if (NGX_HAVE_TCP_FASTOPEN)\n    lsopt.fastopen = -1;\n#endif\n#if (NGX_HAVE_INET6)\n    lsopt.ipv6only = 1;\n#endif\n    for (n = 2; n < cf->args->nelts; n++) {\n        if (ngx_strcmp(value[n].data, "default_server") == 0\n            || ngx_strcmp(value[n].data, "default") == 0)\n        {\n            lsopt.default_server = 1;\n            continue;\n        }\n        if (ngx_strcmp(value[n].data, "bind") == 0) {\n            lsopt.set = 1;\n            lsopt.bind = 1;\n            continue;\n        }\n#if (NGX_HAVE_SETFIB)\n        if (ngx_strncmp(value[n].data, "setfib=", 7) == 0) {\n            lsopt.setfib = ngx_atoi(value[n].data + 7, value[n].len - 7);\n            lsopt.set = 1;\n            lsopt.bind = 1;\n            if (lsopt.setfib == NGX_ERROR) {\n                ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                                   "invalid setfib \\"%V\\"", &value[n]);\n                return NGX_CONF_ERROR;\n            }\n            continue;\n        }\n#endif\n#if (NGX_HAVE_TCP_FASTOPEN)\n        if (ngx_strncmp(value[n].data, "fastopen=", 9) == 0) {\n            lsopt.fastopen = ngx_atoi(value[n].data + 9, value[n].len - 9);\n            lsopt.set = 1;\n            lsopt.bind = 1;\n            if (lsopt.fastopen == NGX_ERROR) {\n                ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                                   "invalid fastopen \\"%V\\"", &value[n]);\n                return NGX_CONF_ERROR;\n            }\n            continue;\n        }\n#endif\n        if (ngx_strncmp(value[n].data, "backlog=", 8) == 0) {\n            lsopt.backlog = ngx_atoi(value[n].data + 8, value[n].len - 8);\n            lsopt.set = 1;\n            lsopt.bind = 1;\n            if (lsopt.backlog == NGX_ERROR || lsopt.backlog == 0) {\n                ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                                   "invalid backlog \\"%V\\"", &value[n]);\n                return NGX_CONF_ERROR;\n            }\n            continue;\n        }\n        if (ngx_strncmp(value[n].data, "rcvbuf=", 7) == 0) {\n            size.len = value[n].len - 7;\n            size.data = value[n].data + 7;\n            lsopt.rcvbuf = ngx_parse_size(&size);\n            lsopt.set = 1;\n            lsopt.bind = 1;\n            if (lsopt.rcvbuf == NGX_ERROR) {\n                ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                                   "invalid rcvbuf \\"%V\\"", &value[n]);\n                return NGX_CONF_ERROR;\n            }\n            continue;\n        }\n        if (ngx_strncmp(value[n].data, "sndbuf=", 7) == 0) {\n            size.len = value[n].len - 7;\n            size.data = value[n].data + 7;\n            lsopt.sndbuf = ngx_parse_size(&size);\n            lsopt.set = 1;\n            lsopt.bind = 1;\n            if (lsopt.sndbuf == NGX_ERROR) {\n                ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                                   "invalid sndbuf \\"%V\\"", &value[n]);\n                return NGX_CONF_ERROR;\n            }\n            continue;\n        }\n        if (ngx_strncmp(value[n].data, "accept_filter=", 14) == 0) {\n#if (NGX_HAVE_DEFERRED_ACCEPT && defined SO_ACCEPTFILTER)\n            lsopt.accept_filter = (char *) &value[n].data[14];\n            lsopt.set = 1;\n            lsopt.bind = 1;\n#else\n            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                               "accept filters \\"%V\\" are not supported "\n                               "on this platform, ignored",\n                               &value[n]);\n#endif\n            continue;\n        }\n        if (ngx_strcmp(value[n].data, "deferred") == 0) {\n#if (NGX_HAVE_DEFERRED_ACCEPT && defined TCP_DEFER_ACCEPT)\n            lsopt.deferred_accept = 1;\n            lsopt.set = 1;\n            lsopt.bind = 1;\n#else\n            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                               "the deferred accept is not supported "\n                               "on this platform, ignored");\n#endif\n            continue;\n        }\n        if (ngx_strncmp(value[n].data, "ipv6only=o", 10) == 0) {\n#if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)\n            if (ngx_strcmp(&value[n].data[10], "n") == 0) {\n                lsopt.ipv6only = 1;\n            } else if (ngx_strcmp(&value[n].data[10], "ff") == 0) {\n                lsopt.ipv6only = 0;\n            } else {\n                ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                                   "invalid ipv6only flags \\"%s\\"",\n                                   &value[n].data[9]);\n                return NGX_CONF_ERROR;\n            }\n            lsopt.set = 1;\n            lsopt.bind = 1;\n            continue;\n#else\n            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                               "ipv6only is not supported "\n                               "on this platform");\n            return NGX_CONF_ERROR;\n#endif\n        }\n        if (ngx_strcmp(value[n].data, "reuseport") == 0) {\n#if (NGX_HAVE_REUSEPORT)\n            lsopt.reuseport = 1;\n            lsopt.set = 1;\n            lsopt.bind = 1;\n#else\n            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                               "reuseport is not supported "\n                               "on this platform, ignored");\n#endif\n            continue;\n        }\n        if (ngx_strcmp(value[n].data, "ssl") == 0) {\n#if (NGX_HTTP_SSL)\n            lsopt.ssl = 1;\n            continue;\n#else\n            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                               "the \\"ssl\\" parameter requires "\n                               "ngx_http_ssl_module");\n            return NGX_CONF_ERROR;\n#endif\n        }\n        if (ngx_strcmp(value[n].data, "http2") == 0) {\n#if (NGX_HTTP_V2)\n            lsopt.http2 = 1;\n            continue;\n#else\n            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                               "the \\"http2\\" parameter requires "\n                               "ngx_http_v2_module");\n            return NGX_CONF_ERROR;\n#endif\n        }\n        if (ngx_strcmp(value[n].data, "spdy") == 0) {\n            ngx_conf_log_error(NGX_LOG_WARN, cf, 0,\n                               "invalid parameter \\"spdy\\": "\n                               "ngx_http_spdy_module was superseded "\n                               "by ngx_http_v2_module");\n            continue;\n        }\n        if (ngx_strncmp(value[n].data, "so_keepalive=", 13) == 0) {\n            if (ngx_strcmp(&value[n].data[13], "on") == 0) {\n                lsopt.so_keepalive = 1;\n            } else if (ngx_strcmp(&value[n].data[13], "off") == 0) {\n                lsopt.so_keepalive = 2;\n            } else {\n#if (NGX_HAVE_KEEPALIVE_TUNABLE)\n                u_char     *p, *end;\n                ngx_str_t   s;\n                end = value[n].data + value[n].len;\n                s.data = value[n].data + 13;\n                p = ngx_strlchr(s.data, end, \':\');\n                if (p == NULL) {\n                    p = end;\n                }\n                if (p > s.data) {\n                    s.len = p - s.data;\n                    lsopt.tcp_keepidle = ngx_parse_time(&s, 1);\n                    if (lsopt.tcp_keepidle == (time_t) NGX_ERROR) {\n                        goto invalid_so_keepalive;\n                    }\n                }\n                s.data = (p < end) ? (p + 1) : end;\n                p = ngx_strlchr(s.data, end, \':\');\n                if (p == NULL) {\n                    p = end;\n                }\n                if (p > s.data) {\n                    s.len = p - s.data;\n                    lsopt.tcp_keepintvl = ngx_parse_time(&s, 1);\n                    if (lsopt.tcp_keepintvl == (time_t) NGX_ERROR) {\n                        goto invalid_so_keepalive;\n                    }\n                }\n                s.data = (p < end) ? (p + 1) : end;\n                if (s.data < end) {\n                    s.len = end - s.data;\n                    lsopt.tcp_keepcnt = ngx_atoi(s.data, s.len);\n                    if (lsopt.tcp_keepcnt == NGX_ERROR) {\n                        goto invalid_so_keepalive;\n                    }\n                }\n                if (lsopt.tcp_keepidle == 0 && lsopt.tcp_keepintvl == 0\n                    && lsopt.tcp_keepcnt == 0)\n                {\n                    goto invalid_so_keepalive;\n                }\n                lsopt.so_keepalive = 1;\n#else\n                ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                                   "the \\"so_keepalive\\" parameter accepts "\n                                   "only \\"on\\" or \\"off\\" on this platform");\n                return NGX_CONF_ERROR;\n#endif\n            }\n            lsopt.set = 1;\n            lsopt.bind = 1;\n            continue;\n#if (NGX_HAVE_KEEPALIVE_TUNABLE)\n        invalid_so_keepalive:\n            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                               "invalid so_keepalive value: \\"%s\\"",\n                               &value[n].data[13]);\n            return NGX_CONF_ERROR;\n#endif\n        }\n        if (ngx_strcmp(value[n].data, "proxy_protocol") == 0) {\n            lsopt.proxy_protocol = 1;\n            continue;\n        }\n        ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                           "invalid parameter \\"%V\\"", &value[n]);\n        return NGX_CONF_ERROR;\n    }\n    for (n = 0; n < u.naddrs; n++) {\n        lsopt.sockaddr = u.addrs[n].sockaddr;\n        lsopt.socklen = u.addrs[n].socklen;\n        lsopt.addr_text = u.addrs[n].name;\n        lsopt.wildcard = ngx_inet_wildcard(lsopt.sockaddr);\n        if (ngx_http_add_listen(cf, cscf, &lsopt) != NGX_OK) {\n            return NGX_CONF_ERROR;\n        }\n    }\n    return NGX_CONF_OK;\n}', 'ngx_int_t\nngx_parse_url(ngx_pool_t *pool, ngx_url_t *u)\n{\n    u_char  *p;\n    size_t   len;\n    p = u->url.data;\n    len = u->url.len;\n    if (len >= 5 && ngx_strncasecmp(p, (u_char *) "unix:", 5) == 0) {\n        return ngx_parse_unix_domain_url(pool, u);\n    }\n    if (len && p[0] == \'[\') {\n        return ngx_parse_inet6_url(pool, u);\n    }\n    return ngx_parse_inet_url(pool, u);\n}', 'static ngx_int_t\nngx_parse_inet_url(ngx_pool_t *pool, ngx_url_t *u)\n{\n    u_char              *host, *port, *last, *uri, *args, *dash;\n    size_t               len;\n    ngx_int_t            n;\n    struct sockaddr_in  *sin;\n    u->socklen = sizeof(struct sockaddr_in);\n    sin = (struct sockaddr_in *) &u->sockaddr;\n    sin->sin_family = AF_INET;\n    u->family = AF_INET;\n    host = u->url.data;\n    last = host + u->url.len;\n    port = ngx_strlchr(host, last, \':\');\n    uri = ngx_strlchr(host, last, \'/\');\n    args = ngx_strlchr(host, last, \'?\');\n    if (args) {\n        if (uri == NULL || args < uri) {\n            uri = args;\n        }\n    }\n    if (uri) {\n        if (u->listen || !u->uri_part) {\n            u->err = "invalid host";\n            return NGX_ERROR;\n        }\n        u->uri.len = last - uri;\n        u->uri.data = uri;\n        last = uri;\n        if (uri < port) {\n            port = NULL;\n        }\n    }\n    if (port) {\n        port++;\n        len = last - port;\n        if (u->listen) {\n            dash = ngx_strlchr(port, last, \'-\');\n            if (dash) {\n                dash++;\n                n = ngx_atoi(dash, last - dash);\n                if (n < 1 || n > 65535) {\n                    u->err = "invalid port";\n                    return NGX_ERROR;\n                }\n                u->last_port = (in_port_t) n;\n                len = dash - port - 1;\n            }\n        }\n        n = ngx_atoi(port, len);\n        if (n < 1 || n > 65535) {\n            u->err = "invalid port";\n            return NGX_ERROR;\n        }\n        if (u->last_port && n > u->last_port) {\n            u->err = "invalid port range";\n            return NGX_ERROR;\n        }\n        u->port = (in_port_t) n;\n        sin->sin_port = htons((in_port_t) n);\n        u->port_text.len = last - port;\n        u->port_text.data = port;\n        last = port - 1;\n    } else {\n        if (uri == NULL) {\n            if (u->listen) {\n                len = last - host;\n                dash = ngx_strlchr(host, last, \'-\');\n                if (dash) {\n                    dash++;\n                    n = ngx_atoi(dash, last - dash);\n                    if (n == NGX_ERROR) {\n                        goto no_port;\n                    }\n                    if (n < 1 || n > 65535) {\n                        u->err = "invalid port";\n                    } else {\n                        u->last_port = (in_port_t) n;\n                    }\n                    len = dash - host - 1;\n                }\n                n = ngx_atoi(host, len);\n                if (n != NGX_ERROR) {\n                    if (u->err) {\n                        return NGX_ERROR;\n                    }\n                    if (n < 1 || n > 65535) {\n                        u->err = "invalid port";\n                        return NGX_ERROR;\n                    }\n                    if (u->last_port && n > u->last_port) {\n                        u->err = "invalid port range";\n                        return NGX_ERROR;\n                    }\n                    u->port = (in_port_t) n;\n                    sin->sin_port = htons((in_port_t) n);\n                    sin->sin_addr.s_addr = INADDR_ANY;\n                    u->port_text.len = last - host;\n                    u->port_text.data = host;\n                    u->wildcard = 1;\n                    return ngx_inet_add_addr(pool, u, &u->sockaddr.sockaddr,\n                                             u->socklen, 1);\n                }\n            }\n        }\nno_port:\n        u->err = NULL;\n        u->no_port = 1;\n        u->port = u->default_port;\n        sin->sin_port = htons(u->default_port);\n        u->last_port = 0;\n    }\n    len = last - host;\n    if (len == 0) {\n        u->err = "no host";\n        return NGX_ERROR;\n    }\n    u->host.len = len;\n    u->host.data = host;\n    if (u->listen && len == 1 && *host == \'*\') {\n        sin->sin_addr.s_addr = INADDR_ANY;\n        u->wildcard = 1;\n        return ngx_inet_add_addr(pool, u, &u->sockaddr.sockaddr, u->socklen, 1);\n    }\n    sin->sin_addr.s_addr = ngx_inet_addr(host, len);\n    if (sin->sin_addr.s_addr != INADDR_NONE) {\n        if (sin->sin_addr.s_addr == INADDR_ANY) {\n            u->wildcard = 1;\n        }\n        return ngx_inet_add_addr(pool, u, &u->sockaddr.sockaddr, u->socklen, 1);\n    }\n    if (u->no_resolve) {\n        return NGX_OK;\n    }\n    if (ngx_inet_resolve_host(pool, u) != NGX_OK) {\n        return NGX_ERROR;\n    }\n    u->family = u->addrs[0].sockaddr->sa_family;\n    u->socklen = u->addrs[0].socklen;\n    ngx_memcpy(&u->sockaddr, u->addrs[0].sockaddr, u->addrs[0].socklen);\n    u->wildcard = ngx_inet_wildcard(&u->sockaddr.sockaddr);\n    return NGX_OK;\n}', 'static ngx_inline u_char *\nngx_strlchr(u_char *p, u_char *last, u_char c)\n{\n    while (p < last) {\n        if (*p == c) {\n            return p;\n        }\n        p++;\n    }\n    return NULL;\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}"]