Skip to content

wdns_reverse_name() behavior with trailing data #25

Description

@shw700

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)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions