Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[patch] dns.unpack_name improvements #120

Open
GoogleCodeExporter opened this issue Mar 14, 2015 · 0 comments
Open

[patch] dns.unpack_name improvements #120

GoogleCodeExporter opened this issue Mar 14, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

In my research, I ran across a sample that sends random data over UDP port 53, 
and dpkt.dns.DNS was raising IndexError when this happened.  I sat down and 
improved the unpack_name implementation.

The new implementation:
    * is not recursive.
    * detects pointer loops as soon as possible and raises UnpackError.
    * always raises dpkt.UnpackError when the packet is malformed in some way.
    * uses '.'.join() to build the return value instead of repeatedly appending to a string.

This resulted in a series of patches (unit tests and the actual implementation).

Original issue reported on code.google.com by george.m...@gmail.com on 15 Jan 2014 at 2:41

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant