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

src/event/ngx_event_udp.c:487:18: Call
485.             ct = udpt->connection;
486. 
487.             rc = ngx_cmp_sockaddr(c->sockaddr, c->socklen,
                      ^
488.                                   ct->sockaddr, ct->socklen, 1);
489. 

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:487:18: Call
485.             ct = udpt->connection;
486. 
487.             rc = ngx_cmp_sockaddr(c->sockaddr, c->socklen,
                      ^
488.                                   ct->sockaddr, ct->socklen, 1);
489. 

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:1405:13: Binary operation: ([0, +oo] - 2):unsigned64 by call to `ngx_cmp_sockaddr` 
  1403. 
  1404.         if (slen1 < slen2) {
  1405.             len = slen1 - offsetof(struct sockaddr_un, sun_path);
                    ^
  1406. 
  1407.         } else {

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;
}
['void\nngx_udp_rbtree_insert_value(ngx_rbtree_node_t *temp,\n    ngx_rbtree_node_t *node, ngx_rbtree_node_t *sentinel)\n{\n    ngx_int_t               rc;\n    ngx_connection_t       *c, *ct;\n    ngx_rbtree_node_t     **p;\n    ngx_udp_connection_t   *udp, *udpt;\n    for ( ;; ) {\n        if (node->key < temp->key) {\n            p = &temp->left;\n        } else if (node->key > temp->key) {\n            p = &temp->right;\n        } else {\n            udp = (ngx_udp_connection_t *) node;\n            c = udp->connection;\n            udpt = (ngx_udp_connection_t *) temp;\n            ct = udpt->connection;\n            rc = ngx_cmp_sockaddr(c->sockaddr, c->socklen,\n                                  ct->sockaddr, ct->socklen, 1);\n            if (rc == 0 && c->listening->wildcard) {\n                rc = ngx_cmp_sockaddr(c->local_sockaddr, c->local_socklen,\n                                      ct->local_sockaddr, ct->local_socklen, 1);\n            }\n            p = (rc < 0) ? &temp->left : &temp->right;\n        }\n        if (*p == sentinel) {\n            break;\n        }\n        temp = *p;\n    }\n    *p = node;\n    node->parent = temp;\n    node->left = sentinel;\n    node->right = sentinel;\n    ngx_rbt_red(node);\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}']