Skip to content

[Migrated] Incorrect index validation #75

Open
@rust-gpu-bot

Description

@rust-gpu-bot

Issue automatically imported from old repo: EmbarkStudios/rust-gpu#1093

Originally creatd by atynagano on 2023-09-21T11:51:47Z


https://github.com/EmbarkStudios/rust-gpu/blob/e87c324bfda6bea144fe2635586281c4ef144f0d/crates/spirv-std/src/byte_addressable_buffer.rs#L73-L78

if byte_index + mem::size_of::<T>() as u32 > (mem::size_of::<u32> * self.data.len()) as u32

Isn't the right-hand side multiplied by 4 because data is &[u32]?

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