src/http/ngx_http_core_module.c:3264: error: Integer Overflow L2
  ([0, +oo] - 5):unsigned64 by call to `ngx_parse_url`.

src/http/ngx_http_core_module.c:3264:9: Call
3262.     u.default_port = 80;
3263. 
3264.     if (ngx_parse_url(cf->pool, &u) != NGX_OK) {
              ^
3265.         if (u.err) {
3266.             ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,

src/core/ngx_inet.c:285:1: Parameter `u->url.len`
  283. 
  284. 
  285. ngx_int_t
       ^
  286. ngx_parse_url(ngx_pool_t *pool, ngx_url_t *u)
  287. {

src/core/ngx_inet.c:293:16: Call
  291. 
  292.     if (ngx_strncasecmp(p, (u_char *) "unix:", 5) == 0) {
  293.         return ngx_parse_unix_domain_url(pool, u);
                      ^
  294.     }
  295. 

src/core/ngx_inet.c:309:1: <LHS trace>
307. 
308. 
309. static ngx_int_t
     ^
310. ngx_parse_unix_domain_url(ngx_pool_t *pool, ngx_url_t *u)
311. {

src/core/ngx_inet.c:309:1: Parameter `u->url.len`
    307. 
    308. 
    309. static ngx_int_t
         ^
    310. ngx_parse_unix_domain_url(ngx_pool_t *pool, ngx_url_t *u)
    311. {

src/core/ngx_inet.c:317:5: Assignment
    315.     struct sockaddr_un  *saun;
    316. 
    317.     len = u->url.len;
             ^
    318.     path = u->url.data;
    319. 

src/core/ngx_inet.c:321:5: Binary operation: ([0, +oo] - 5):unsigned64 by call to `ngx_parse_url` 
    319. 
    320.     path += 5;
    321.     len -= 5;
             ^
    322. 
    323.     if (u->uri_part) {

static ngx_int_t
ngx_parse_unix_domain_url(ngx_pool_t *pool, ngx_url_t *u)
{
#if (NGX_HAVE_UNIX_DOMAIN)
    u_char              *path, *uri, *last;
    size_t               len;
    struct sockaddr_un  *saun;
    len = u->url.len;
    path = u->url.data;
    path += 5;
    len -= 5;
    if (u->uri_part) {
        last = path + len;
        uri = ngx_strlchr(path, last, ':');
        if (uri) {
            len = uri - path;
            uri++;
            u->uri.len = last - uri;
            u->uri.data = uri;
        }
    }
    if (len == 0) {
        u->err = "no path in the unix domain socket";
        return NGX_ERROR;
    }
    u->host.len = len++;
    u->host.data = path;
    if (len > sizeof(saun->sun_path)) {
        u->err = "too long path in the unix domain socket";
        return NGX_ERROR;
    }
    u->socklen = sizeof(struct sockaddr_un);
    saun = (struct sockaddr_un *) &u->sockaddr;
    saun->sun_family = AF_UNIX;
    (void) ngx_cpystrn((u_char *) saun->sun_path, path, len);
    u->addrs = ngx_pcalloc(pool, sizeof(ngx_peer_addr_t));
    if (u->addrs == NULL) {
        return NGX_ERROR;
    }
    saun = ngx_pcalloc(pool, sizeof(struct sockaddr_un));
    if (saun == NULL) {
        return NGX_ERROR;
    }
    u->family = AF_UNIX;
    u->naddrs = 1;
    saun->sun_family = AF_UNIX;
    (void) ngx_cpystrn((u_char *) saun->sun_path, path, len);
    u->addrs[0].sockaddr = (struct sockaddr *) saun;
    u->addrs[0].socklen = sizeof(struct sockaddr_un);
    u->addrs[0].name.len = len + 4;
    u->addrs[0].name.data = u->url.data;
    return NGX_OK;
#else
    u->err = "the unix domain sockets are not supported on this platform";
    return NGX_ERROR;
#endif
}
['static char *\nngx_http_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)\n{\n    ngx_http_core_srv_conf_t *scf = conf;\n    ngx_str_t          *value, size;\n    ngx_url_t           u;\n    ngx_uint_t          n;\n    ngx_http_listen_t  *ls;\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    ls = ngx_array_push(&scf->listen);\n    if (ls == NULL) {\n        return NGX_CONF_ERROR;\n    }\n    ngx_memzero(ls, sizeof(ngx_http_listen_t));\n    ngx_memcpy(ls->sockaddr, u.sockaddr, u.socklen);\n    ls->socklen = u.socklen;\n    ls->file_name = cf->conf_file->file.name.data;\n    ls->line = cf->conf_file->line;\n    ls->conf.backlog = NGX_LISTEN_BACKLOG;\n    ls->conf.rcvbuf = -1;\n    ls->conf.sndbuf = -1;\n    ls->conf.wildcard = u.wildcard;\n    (void) ngx_sock_ntop((struct sockaddr *) &ls->sockaddr, ls->conf.addr,\n                         NGX_SOCKADDR_STRLEN, 1);\n    if (cf->args->nelts == 2) {\n        return NGX_CONF_OK;\n    }\n    if (ngx_strcmp(value[2].data, "default") == 0) {\n        ls->conf.default_server = 1;\n        n = 3;\n    } else {\n        n = 2;\n    }\n    for (   ; n < cf->args->nelts; n++) {\n        if (ls->conf.default_server == 0) {\n            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                               "\\"%V\\" parameter can be specified for "\n                               "the default \\"listen\\" directive only",\n                               &value[n]);\n            return NGX_CONF_ERROR;\n        }\n        if (ngx_strcmp(value[n].data, "bind") == 0) {\n            ls->conf.bind = 1;\n            continue;\n        }\n        if (ngx_strncmp(value[n].data, "backlog=", 8) == 0) {\n            ls->conf.backlog = ngx_atoi(value[n].data + 8, value[n].len - 8);\n            ls->conf.bind = 1;\n            if (ls->conf.backlog == NGX_ERROR || ls->conf.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            ls->conf.rcvbuf = ngx_parse_size(&size);\n            ls->conf.bind = 1;\n            if (ls->conf.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            ls->conf.sndbuf = ngx_parse_size(&size);\n            ls->conf.bind = 1;\n            if (ls->conf.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            ls->conf.accept_filter = (char *) &value[n].data[14];\n            ls->conf.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            ls->conf.deferred_accept = 1;\n            ls->conf.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            struct sockaddr  *sa;\n            sa = (struct sockaddr *) ls->sockaddr;\n            if (sa->sa_family == AF_INET6) {\n                if (ngx_strcmp(&value[n].data[10], "n") == 0) {\n                    ls->conf.ipv6only = 1;\n                } else if (ngx_strcmp(&value[n].data[10], "ff") == 0) {\n                    ls->conf.ipv6only = 2;\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                ls->conf.bind = 1;\n            } else {\n                ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                                   "ipv6only is not supported "\n                                   "on addr \\"%s\\", ignored",\n                                   ls->conf.addr);\n            }\n            continue;\n#else\n            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                               "bind ipv6only is not supported "\n                               "on this platform");\n            return NGX_CONF_ERROR;\n#endif\n        }\n        if (ngx_strcmp(value[n].data, "ssl") == 0) {\n#if (NGX_HTTP_SSL)\n            ls->conf.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        ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,\n                           "the invalid \\"%V\\" parameter", &value[n]);\n        return NGX_CONF_ERROR;\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    p = u->url.data;\n    if (ngx_strncasecmp(p, (u_char *) "unix:", 5) == 0) {\n        return ngx_parse_unix_domain_url(pool, u);\n    }\n    if ((p[0] == \':\' || p[0] == \'/\') && !u->listen) {\n        u->err = "invalid host";\n        return NGX_ERROR;\n    }\n    if (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_unix_domain_url(ngx_pool_t *pool, ngx_url_t *u)\n{\n#if (NGX_HAVE_UNIX_DOMAIN)\n    u_char              *path, *uri, *last;\n    size_t               len;\n    struct sockaddr_un  *saun;\n    len = u->url.len;\n    path = u->url.data;\n    path += 5;\n    len -= 5;\n    if (u->uri_part) {\n        last = path + len;\n        uri = ngx_strlchr(path, last, \':\');\n        if (uri) {\n            len = uri - path;\n            uri++;\n            u->uri.len = last - uri;\n            u->uri.data = uri;\n        }\n    }\n    if (len == 0) {\n        u->err = "no path in the unix domain socket";\n        return NGX_ERROR;\n    }\n    u->host.len = len++;\n    u->host.data = path;\n    if (len > sizeof(saun->sun_path)) {\n        u->err = "too long path in the unix domain socket";\n        return NGX_ERROR;\n    }\n    u->socklen = sizeof(struct sockaddr_un);\n    saun = (struct sockaddr_un *) &u->sockaddr;\n    saun->sun_family = AF_UNIX;\n    (void) ngx_cpystrn((u_char *) saun->sun_path, path, len);\n    u->addrs = ngx_pcalloc(pool, sizeof(ngx_peer_addr_t));\n    if (u->addrs == NULL) {\n        return NGX_ERROR;\n    }\n    saun = ngx_pcalloc(pool, sizeof(struct sockaddr_un));\n    if (saun == NULL) {\n        return NGX_ERROR;\n    }\n    u->family = AF_UNIX;\n    u->naddrs = 1;\n    saun->sun_family = AF_UNIX;\n    (void) ngx_cpystrn((u_char *) saun->sun_path, path, len);\n    u->addrs[0].sockaddr = (struct sockaddr *) saun;\n    u->addrs[0].socklen = sizeof(struct sockaddr_un);\n    u->addrs[0].name.len = len + 4;\n    u->addrs[0].name.data = u->url.data;\n    return NGX_OK;\n#else\n    u->err = "the unix domain sockets are not supported on this platform";\n    return NGX_ERROR;\n#endif\n}']