Skip to content

SeedableRng::seed_from_u64 panics if the Seed type's length is not a multiple of 4 #1082

@sfackler

Description

@sfackler

If a SeedableRng implementation uses a seed type with a length that isn't divisible by 4, the final chunk of the seed buffer will not be 4 bytes, so the copy_from_slice call will panic: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=2e5eea3830867e62fe8a47f02721a60a.

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