diff --git a/trunk/ipaddr.py b/trunk/ipaddr.py
index <HASH>..<HASH> 100644
--- a/trunk/ipaddr.py
+++ b/trunk/ipaddr.py
@@ -1490,6 +1490,8 @@ class _BaseV6(object):
         # Whitelist the characters, since int() allows a lot of bizarre stuff.
         if not self._HEX_DIGITS.issuperset(hextet_str):
             raise ValueError
+        if len(hextet_str) > 4:
+          raise ValueError
         hextet_int = int(hextet_str, 16)
         if hextet_int > 0xFFFF:
             raise ValueError
diff --git a/trunk/ipaddr_test.py b/trunk/ipaddr_test.py
index <HASH>..<HASH> 100755
--- a/trunk/ipaddr_test.py
+++ b/trunk/ipaddr_test.py
@@ -133,6 +133,7 @@ class IpaddrUnitTest(unittest.TestCase):
         AssertInvalidIP(":1:2:3:4:5:6:")
         AssertInvalidIP("192.0.2.1/32")
         AssertInvalidIP("2001:db8::1/128")
+        AssertInvalidIP("02001:db8::")
 
         self.assertRaises(ipaddr.AddressValueError, ipaddr.IPv4Network, '')
         self.assertRaises(ipaddr.AddressValueError, ipaddr.IPv4Network,
ipaddr incorrectly parses some V6 addresses.

issue<I>.