The implementation allowed a hexadecimal string without any colons.
Signed-off-by: Jo-Philipp Wich <redacted>
var prefix = (prefix_suffix[0] || '0').split(/:/);
var suffix = prefix_suffix.length > 1 ? (prefix_suffix[1] || '0').split(/:/) : [];
- if (suffix.length ? (prefix.length + suffix.length > 7) : (prefix.length > 8))
+ if (suffix.length ? (prefix.length + suffix.length > 7)
+ : ((prefix_suffix.length < 2 && prefix.length < 8) || prefix.length > 8))
return null;
var i, word;