I'm getting IndexError when reading message from wire in a response
from servers that don't handle EDNS well:

  File "/usr/lib/pymodules/python2.6/dns/query.py", line 253, in tcp
    one_rr_per_rrset=one_rr_per_rrset)
  File "/usr/lib/pymodules/python2.6/dns/message.py", line 775, in from_wire
    reader.read()
  File "/usr/lib/pymodules/python2.6/dns/message.py", line 720, in read
    self._get_section(self.message.additional, adcount)
  File "/usr/lib/pymodules/python2.6/dns/message.py", line 624, in _get_section
    (name, used) = dns.name.from_wire(self.wire, self.current)
  File "/usr/lib/pymodules/python2.6/dns/name.py", line 676, in from_wire
    count = ord(message[current])
IndexError: string index out of range

Example:
$ dig +edns=0 @81.174.68.5 m54tdea2og.mail1.unbit.it. A

vs.

$ dig @81.174.68.5 m54tdea2og.mail1.unbit.it. A

I've worked around it until now, but It would be great if this
IndexError could be caught and re-raised as some type of formerror or
something else appropriate.

thanks,
Casey
_______________________________________________
dnspython-bugs mailing list
[email protected]
http://howl.play-bow.org/mailman/listinfo.cgi/dnspython-bugs

Reply via email to