src/event/ngx_event_udp.c:627: error: Integer Overflow L2
  ([0, +oo] - 2):unsigned64 by call to `ngx_cmp_sockaddr`.

src/event/ngx_event_udp.c:623:14: Call
621.         c = udp->connection;
622. 
623.         rc = ngx_cmp_sockaddr(sockaddr, socklen,
                  ^
624.                               c->sockaddr, c->socklen, 1);
625. 

src/core/ngx_inet.c:1362:1: Parameter `sa2->sin_addr.s_addr`
  1360. 
  1361. 
  1362. ngx_int_t
        ^
  1363. ngx_cmp_sockaddr(struct sockaddr *sa1, socklen_t slen1,
  1364.     struct sockaddr *sa2, socklen_t slen2, ngx_uint_t cmp_port)

src/event/ngx_event_udp.c:623:14: Call
621.         c = udp->connection;
622. 
623.         rc = ngx_cmp_sockaddr(sockaddr, socklen,
                  ^
624.                               c->sockaddr, c->socklen, 1);
625. 

src/core/ngx_inet.c:1362:1: Parameter `sa2->sin_addr.s_addr`
  1360. 
  1361. 
  1362. ngx_int_t
        ^
  1363. ngx_cmp_sockaddr(struct sockaddr *sa1, socklen_t slen1,
  1364.     struct sockaddr *sa2, socklen_t slen2, ngx_uint_t cmp_port)

src/event/ngx_event_udp.c:627:18: Call
625. 
626.         if (rc == 0 && ls->wildcard) {
627.             rc = ngx_cmp_sockaddr(local_sockaddr, local_socklen,
                      ^
628.                                   c->local_sockaddr, c->local_socklen, 1);
629.         }

src/core/ngx_inet.c:1362:1: <LHS trace>
1360. 
1361. 
1362. ngx_int_t
      ^
1363. ngx_cmp_sockaddr(struct sockaddr *sa1, socklen_t slen1,
1364.     struct sockaddr *sa2, socklen_t slen2, ngx_uint_t cmp_port)

src/core/ngx_inet.c:1362:1: Parameter `slen2`
  1360. 
  1361. 
  1362. ngx_int_t
        ^
  1363. ngx_cmp_sockaddr(struct sockaddr *sa1, socklen_t slen1,
  1364.     struct sockaddr *sa2, socklen_t slen2, ngx_uint_t cmp_port)

src/core/ngx_inet.c:1408:13: Binary operation: ([0, +oo] - 2):unsigned64 by call to `ngx_cmp_sockaddr` 
  1406. 
  1407.         } else {
  1408.             len = slen2 - offsetof(struct sockaddr_un, sun_path);
                    ^
  1409.         }
  1410. 

ngx_int_t
ngx_cmp_sockaddr(struct sockaddr *sa1, socklen_t slen1,
    struct sockaddr *sa2, socklen_t slen2, ngx_uint_t cmp_port)
{
    struct sockaddr_in   *sin1, *sin2;
#if (NGX_HAVE_INET6)
    struct sockaddr_in6  *sin61, *sin62;
#endif
#if (NGX_HAVE_UNIX_DOMAIN)
    size_t                len;
    struct sockaddr_un   *saun1, *saun2;
#endif
    if (sa1->sa_family != sa2->sa_family) {
        return NGX_DECLINED;
    }
    switch (sa1->sa_family) {
#if (NGX_HAVE_INET6)
    case AF_INET6:
        sin61 = (struct sockaddr_in6 *) sa1;
        sin62 = (struct sockaddr_in6 *) sa2;
        if (cmp_port && sin61->sin6_port != sin62->sin6_port) {
            return NGX_DECLINED;
        }
        if (ngx_memcmp(&sin61->sin6_addr, &sin62->sin6_addr, 16) != 0) {
            return NGX_DECLINED;
        }
        break;
#endif
#if (NGX_HAVE_UNIX_DOMAIN)
    case AF_UNIX:
        saun1 = (struct sockaddr_un *) sa1;
        saun2 = (struct sockaddr_un *) sa2;
        if (slen1 < slen2) {
            len = slen1 - offsetof(struct sockaddr_un, sun_path);
        } else {
            len = slen2 - offsetof(struct sockaddr_un, sun_path);
        }
        if (len > sizeof(saun1->sun_path)) {
            len = sizeof(saun1->sun_path);
        }
        if (ngx_memcmp(&saun1->sun_path, &saun2->sun_path, len) != 0) {
            return NGX_DECLINED;
        }
        break;
#endif
    default:
        sin1 = (struct sockaddr_in *) sa1;
        sin2 = (struct sockaddr_in *) sa2;
        if (cmp_port && sin1->sin_port != sin2->sin_port) {
            return NGX_DECLINED;
        }
        if (sin1->sin_addr.s_addr != sin2->sin_addr.s_addr) {
            return NGX_DECLINED;
        }
        break;
    }
    return NGX_OK;
}
['static ngx_connection_t *\nngx_lookup_udp_connection(ngx_listening_t *ls, struct sockaddr *sockaddr,\n    socklen_t socklen, struct sockaddr *local_sockaddr, socklen_t local_socklen)\n{\n    uint32_t               hash;\n    ngx_int_t              rc;\n    ngx_connection_t      *c;\n    ngx_rbtree_node_t     *node, *sentinel;\n    ngx_udp_connection_t  *udp;\n#if (NGX_HAVE_UNIX_DOMAIN)\n    if (sockaddr->sa_family == AF_UNIX) {\n        struct sockaddr_un *saun = (struct sockaddr_un *) sockaddr;\n        if (socklen <= (socklen_t) offsetof(struct sockaddr_un, sun_path)\n            || saun->sun_path[0] == \'\\0\')\n        {\n            ngx_log_debug0(NGX_LOG_DEBUG_EVENT, ngx_cycle->log, 0,\n                           "unbound unix socket");\n            return NULL;\n        }\n    }\n#endif\n    node = ls->rbtree.root;\n    sentinel = ls->rbtree.sentinel;\n    ngx_crc32_init(hash);\n    ngx_crc32_update(&hash, (u_char *) sockaddr, socklen);\n    if (ls->wildcard) {\n        ngx_crc32_update(&hash, (u_char *) local_sockaddr, local_socklen);\n    }\n    ngx_crc32_final(hash);\n    while (node != sentinel) {\n        if (hash < node->key) {\n            node = node->left;\n            continue;\n        }\n        if (hash > node->key) {\n            node = node->right;\n            continue;\n        }\n        udp = (ngx_udp_connection_t *) node;\n        c = udp->connection;\n        rc = ngx_cmp_sockaddr(sockaddr, socklen,\n                              c->sockaddr, c->socklen, 1);\n        if (rc == 0 && ls->wildcard) {\n            rc = ngx_cmp_sockaddr(local_sockaddr, local_socklen,\n                                  c->local_sockaddr, c->local_socklen, 1);\n        }\n        if (rc == 0) {\n            return c;\n        }\n        node = (rc < 0) ? node->left : node->right;\n    }\n    return NULL;\n}', 'ngx_int_t\nngx_cmp_sockaddr(struct sockaddr *sa1, socklen_t slen1,\n    struct sockaddr *sa2, socklen_t slen2, ngx_uint_t cmp_port)\n{\n    struct sockaddr_in   *sin1, *sin2;\n#if (NGX_HAVE_INET6)\n    struct sockaddr_in6  *sin61, *sin62;\n#endif\n#if (NGX_HAVE_UNIX_DOMAIN)\n    size_t                len;\n    struct sockaddr_un   *saun1, *saun2;\n#endif\n    if (sa1->sa_family != sa2->sa_family) {\n        return NGX_DECLINED;\n    }\n    switch (sa1->sa_family) {\n#if (NGX_HAVE_INET6)\n    case AF_INET6:\n        sin61 = (struct sockaddr_in6 *) sa1;\n        sin62 = (struct sockaddr_in6 *) sa2;\n        if (cmp_port && sin61->sin6_port != sin62->sin6_port) {\n            return NGX_DECLINED;\n        }\n        if (ngx_memcmp(&sin61->sin6_addr, &sin62->sin6_addr, 16) != 0) {\n            return NGX_DECLINED;\n        }\n        break;\n#endif\n#if (NGX_HAVE_UNIX_DOMAIN)\n    case AF_UNIX:\n        saun1 = (struct sockaddr_un *) sa1;\n        saun2 = (struct sockaddr_un *) sa2;\n        if (slen1 < slen2) {\n            len = slen1 - offsetof(struct sockaddr_un, sun_path);\n        } else {\n            len = slen2 - offsetof(struct sockaddr_un, sun_path);\n        }\n        if (len > sizeof(saun1->sun_path)) {\n            len = sizeof(saun1->sun_path);\n        }\n        if (ngx_memcmp(&saun1->sun_path, &saun2->sun_path, len) != 0) {\n            return NGX_DECLINED;\n        }\n        break;\n#endif\n    default:\n        sin1 = (struct sockaddr_in *) sa1;\n        sin2 = (struct sockaddr_in *) sa2;\n        if (cmp_port && sin1->sin_port != sin2->sin_port) {\n            return NGX_DECLINED;\n        }\n        if (sin1->sin_addr.s_addr != sin2->sin_addr.s_addr) {\n            return NGX_DECLINED;\n        }\n        break;\n    }\n    return NGX_OK;\n}']