Skip to content

Mark C bindings as unsafe or don't make them public #1

@ammaraskar

Description

@ammaraskar

Hi there, we (Rust group @sslab-gatech) are scanning crates on crates.io for potential soundness bugs. We noticed that the bayer::ffi module contains functions intended to serve as C bindings:

https://github.com/wangds/libbayer/blob/master/src/ffi.rs

However, these should probably be marked as unsafe or not be exposed publicly in the crate, otherwise it allows users to potentially cause memory safety issues from safe Rust by passing wrong raw pointers to the ffi functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions