ip: handle ipv4-mapped ipv6 addr missing sections properly.

This commit is contained in:
Christopher Jeffrey 2017-01-16 14:42:36 -08:00
parent 3960275b0c
commit bcde9d59a7
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -280,6 +280,14 @@ IP.parseV6 = function parseV6(str, buf, offset) {
assert(missing >= 0, 'IPv6 address is too long.');
assert(parts.length >= 2, 'Not an IPv6 address.');
for (i = 0; i < parts.length; i++) {
word = parts[i];
if (IP.isV4Format(word))
missing--;
}
assert(missing >= 0, 'IPv6 address is too long.');
for (i = 0; i < parts.length; i++) {
word = parts[i];