Skip to content

Correct callback function signature fn data_ptr(&self) -> *mut c_void #403

@Taowyoo

Description

@Taowyoo

From @MihirLuthra :

I see we have some code in rust-mbedtls that would generally result in undefined behaviour. I mean the callback functions where we have signature like:
fn data_ptr(&self) -> *mut c_void
which usually results in:
self as *const _ as *mut _
Is there any ticket already to address this in mbedtls? Maybe changing the signature or making call sites use UnsafeCell

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