Skip to content

Unsoundness in ninjabook #2150

@lwz23

Description

@lwz23

see ninja-quant/ninjabook#3 for detail.
Description
The get_mutand get function in the Orderbook implementation uses unsafe code to call Buffer::get_unchecked_mut, bypassing bounds checking. This function is unsound because it allows access to an arbitrary index without ensuring that the index is within bounds. If the caller provides an out-of-bounds index, the program will invoke undefined behavior (UB).

author didn't reply yet, so no patched version.

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