Skip to content

Unsoundness in UnixPath #1494

Closed
Closed
@coolreader18

Description

@coolreader18
println!("{}", UnixAddr(sockaddr_un { sun_family: AF_UNIX as _, sun_path: [0; 108] }, 10000));

Output;

"@<\u{0} x 108><9892 bytes of garbage>"

Also in the PartialEq and Hash impls and as_abstract; anywhere that uses sun_path() raw without doing what path() does and calling strnlen (and even path() is stiill unsound, it still calls sun_path() and creates a slice with a length longer than it should have)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions