Skip to content

TryFromBytes::read_read_from_* should validate in-place before reading #2981

@joshlf

Description

@joshlf

Currently, we unconditionally read into the local stack frame and then verify the contents. For types with alignment 1, we should validate in-place, then only copy the source to a well-aligned stack allocation if it is valid.

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