src/core/ngx_inet.c:118: error: Integer Overflow L2
  ([0, +oo] - 1):unsigned64.

src/core/ngx_inet.c:75:5: <LHS trace>
73.     zero = NULL;
74.     digit = NULL;
75.     len4 = 0;
        ^
76.     nibbles = 0;
77.     word = 0;

src/core/ngx_inet.c:75:5: Assignment
73.     zero = NULL;
74.     digit = NULL;
75.     len4 = 0;
        ^
76.     nibbles = 0;
77.     word = 0;

src/core/ngx_inet.c:118:20: Binary operation: ([0, +oo] - 1):unsigned64
116.             }
117. 
118.             word = ngx_inet_addr(digit, len4 - 1);
                        ^
119.             if (word == INADDR_NONE) {
120.                 return NGX_ERROR;

ngx_int_t
ngx_inet6_addr(u_char *p, size_t len, u_char *addr)
{
    u_char      c, *zero, *digit, *s, *d;
    size_t      len4;
    ngx_uint_t  n, nibbles, word;
    if (len == 0) {
        return NGX_ERROR;
    }
    zero = NULL;
    digit = NULL;
    len4 = 0;
    nibbles = 0;
    word = 0;
    n = 8;
    if (p[0] == ':') {
        p++;
        len--;
    }
    for ( ; len; len--) {
        c = *p++;
        if (c == ':') {
            if (nibbles) {
                digit = p;
                len4 = len;
                *addr++ = (u_char) (word >> 8);
                *addr++ = (u_char) (word & 0xff);
                if (--n) {
                    nibbles = 0;
                    word = 0;
                    continue;
                }
            } else {
                if (zero == NULL) {
                    digit = p;
                    len4 = len;
                    zero = addr;
                    continue;
                }
            }
            return NGX_ERROR;
        }
        if (c == '.' && nibbles) {
            if (n < 2 || digit == NULL) {
                return NGX_ERROR;
            }
            word = ngx_inet_addr(digit, len4 - 1);
            if (word == INADDR_NONE) {
                return NGX_ERROR;
            }
            word = ntohl(word);
            *addr++ = (u_char) ((word >> 24) & 0xff);
            *addr++ = (u_char) ((word >> 16) & 0xff);
            n--;
            break;
        }
        if (++nibbles > 4) {
            return NGX_ERROR;
        }
        if (c >= '0' && c <= '9') {
            word = word * 16 + (c - '0');
            continue;
        }
        c |= 0x20;
        if (c >= 'a' && c <= 'f') {
            word = word * 16 + (c - 'a') + 10;
            continue;
        }
        return NGX_ERROR;
    }
    if (nibbles == 0 && zero == NULL) {
        return NGX_ERROR;
    }
    *addr++ = (u_char) (word >> 8);
    *addr++ = (u_char) (word & 0xff);
    if (--n) {
        if (zero) {
            n *= 2;
            s = addr - 1;
            d = s + n;
            while (s >= zero) {
                *d-- = *s--;
            }
            ngx_memzero(zero, n);
            return NGX_OK;
        }
    } else {
        if (zero == NULL) {
            return NGX_OK;
        }
    }
    return NGX_ERROR;
}
["ngx_int_t\nngx_inet6_addr(u_char *p, size_t len, u_char *addr)\n{\n    u_char      c, *zero, *digit, *s, *d;\n    size_t      len4;\n    ngx_uint_t  n, nibbles, word;\n    if (len == 0) {\n        return NGX_ERROR;\n    }\n    zero = NULL;\n    digit = NULL;\n    len4 = 0;\n    nibbles = 0;\n    word = 0;\n    n = 8;\n    if (p[0] == ':') {\n        p++;\n        len--;\n    }\n    for ( ; len; len--) {\n        c = *p++;\n        if (c == ':') {\n            if (nibbles) {\n                digit = p;\n                len4 = len;\n                *addr++ = (u_char) (word >> 8);\n                *addr++ = (u_char) (word & 0xff);\n                if (--n) {\n                    nibbles = 0;\n                    word = 0;\n                    continue;\n                }\n            } else {\n                if (zero == NULL) {\n                    digit = p;\n                    len4 = len;\n                    zero = addr;\n                    continue;\n                }\n            }\n            return NGX_ERROR;\n        }\n        if (c == '.' && nibbles) {\n            if (n < 2 || digit == NULL) {\n                return NGX_ERROR;\n            }\n            word = ngx_inet_addr(digit, len4 - 1);\n            if (word == INADDR_NONE) {\n                return NGX_ERROR;\n            }\n            word = ntohl(word);\n            *addr++ = (u_char) ((word >> 24) & 0xff);\n            *addr++ = (u_char) ((word >> 16) & 0xff);\n            n--;\n            break;\n        }\n        if (++nibbles > 4) {\n            return NGX_ERROR;\n        }\n        if (c >= '0' && c <= '9') {\n            word = word * 16 + (c - '0');\n            continue;\n        }\n        c |= 0x20;\n        if (c >= 'a' && c <= 'f') {\n            word = word * 16 + (c - 'a') + 10;\n            continue;\n        }\n        return NGX_ERROR;\n    }\n    if (nibbles == 0 && zero == NULL) {\n        return NGX_ERROR;\n    }\n    *addr++ = (u_char) (word >> 8);\n    *addr++ = (u_char) (word & 0xff);\n    if (--n) {\n        if (zero) {\n            n *= 2;\n            s = addr - 1;\n            d = s + n;\n            while (s >= zero) {\n                *d-- = *s--;\n            }\n            ngx_memzero(zero, n);\n            return NGX_OK;\n        }\n    } else {\n        if (zero == NULL) {\n            return NGX_OK;\n        }\n    }\n    return NGX_ERROR;\n}"]