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

wdns_reverse_name() behavior with trailing data #25

Open
shw700 opened this issue Jan 18, 2018 · 0 comments
Open

wdns_reverse_name() behavior with trailing data #25

shw700 opened this issue Jan 18, 2018 · 0 comments

Comments

@shw700
Copy link
Contributor

shw700 commented Jan 18, 2018

Right now the behavior of wdns_reverse_name() when presented with a buffer that is longer than the (proper, expected) preceding sequence of nul byte-terminated labels is to fail without producing an error code, resulting in null-output.

This probably shouldn't happen; expected behavior would see the initial sequence of labels reversed.

Example from unit tests for reproduction:
.input = "\x07" "testing" "\x08" "trailing" "\x04" "data" "\x03" "fsi" "\x02" "io" "\x00" "\x04" "abcd",
.ilen = 1 + 7 + 1 + 8 + 1 + 4 + 1 + 3 + 1 + 2 + 1 + 1 + 4 + 1,

(works as anticipated if the final "1 + 4 + 1" is removed from the length)

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

No branches or pull requests

1 participant