Skip to content

Dns.GetHostEntry do not validate for null characters #128641

Closed

Description

@mrek-msft

Dns.GetHostEntry do not work well when hostname to resolve contains \0 character. Call under the hood pass such string to native library which interprets it as an end of the string and thus translation fails. It would be nice to include validation and throw ArgumentException or something like that and do not attempt to translate it at all.

Activity

  1. self-assigned this
    on May 27, 2026
  2. added
    untriaged
    on May 27, 2026
  3. dotnet-policy-service commented on May 27, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @karelz, @dotnet/ncl
    See info in area-owners.md if you want to be subscribed.

  4. added this to the 11.0.0 milestone on Jun 2, 2026
  5. removed
    untriaged
    on Jun 2, 2026
  6. removed their assignment
    on Jun 4, 2026
  7. locked and limited conversation to collaborators on Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions