]> 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:21:37 +0000 (09:21 +0100)
committerBob Halley <halley@dnspython.org>
Sun, 28 Apr 2013 08:21:37 +0000 (09:21 +0100)
ChangeLog
dns/name.py

index ef4ab5f4af143305b107d388dfee5d8b4b6fb93b..2db5b022ff4ba187bcd1dadb6ca3c1768b748a6c 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 ed3ffeec5713ee73f1f7fbc82377767cee126008..293ab9515542f2caa458be1f8558bc93fafd76dc 100644 (file)
@@ -419,7 +419,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)
                 file.write(chr(l))