Skip to content

uefi-rs APIs which want a well-aligned buffer but accept &mut [u8] are unsafe #144

@HadrienG2

Description

@HadrienG2

If the user-provided slice doesn't actually match the expected alignment, undefined behavior will ensue.

FWIW, many of these buffer-wranging APIs actually want to receive an *mut [u8], because they are often meant to manipulate uninitialized memory and that concept doesn't exist at the Rust reference layer.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions