Python 2.7.6 Windows bug in __getslice__ in wiredata.py
9 views
Skip to first unread message
Matthäus Wander
unread,
Jul 24, 2014, 8:50:23 AM7/24/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to dnspyth...@googlegroups.com
Hi,
__getslice__ in wiredata.py assumes that the right bound will be set to
sys.maxint if unspecified. This not true with 64 bit Python 2.7.6 on
Windows, where sys.maxint is 2^(31)-1 but the right bound is 2^(63)-1.
The bug can be observed when parsing a DNS message with a ::ffff:1.2.3.4
address in AAAA record. The slicing triggers an IndexError which raises
a FormError only on Windows. Example code and bugfix attached.