]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Do not add items with offsets >= 2^14 to the compression table
authorBob Halley <halley@dnspython.org>
Sun, 28 Apr 2013 08:23:02 +0000 (09:23 +0100)
committerBob Halley <halley@dnspython.org>
Sun, 28 Apr 2013 08:23:02 +0000 (09:23 +0100)
ChangeLog
dns/name.py

index c8b5d92010f7b18a31683de6c568a6c6027d648b..472051c000082b8830a392e485df7df5c86cd72f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-04-28  Bob Halley  <halley@dnspython.org>
+
+       * dns/name.py (Name.to_wire): Do not add items with offsets >= 2^14
+         to the compression table.  Thanks to Casey Deccio for discovering
+         this bug.
+
 2013-04-26  Bob Halley  <halley@dnspython.org>
 
        * dns/ipv6.py (inet_ntoa): We now comply with RFC 5952 section
index 3ca61407327d2e2ccfee7a241193e155d6ad92b6..3d3b1bed2f288c75fc6da8894c655ec2115d1127 100644 (file)
@@ -429,7 +429,7 @@ class Name(object):
             else:
                 if not compress is None and len(n) > 1:
                     pos = file.tell()
-                    if pos < 0xc000:
+                    if pos <= 0x3fff:
                         compress[n] = pos
                 l = len(label)
                 dns.util.write_uint8(file, l)