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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions