From: Bob Halley Date: Sun, 28 Apr 2013 08:23:02 +0000 (+0100) Subject: Do not add items with offsets >= 2^14 to the compression table X-Git-Tag: v1.11.0-py3~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da68a287812b93c81dc789af39fcf28276e4b13c;p=thirdparty%2Fdnspython.git Do not add items with offsets >= 2^14 to the compression table --- diff --git a/ChangeLog b/ChangeLog index c8b5d920..472051c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-04-28 Bob Halley + + * 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 * dns/ipv6.py (inet_ntoa): We now comply with RFC 5952 section diff --git a/dns/name.py b/dns/name.py index 3ca61407..3d3b1bed 100644 --- a/dns/name.py +++ b/dns/name.py @@ -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)