ort::value::Value
is unsound since it exposes raw pointers as public fields
#69
Labels
p: high
high priority
The
Value
type is defined like this:Enum variants and their fields are public, so downstream code can:
Value
from an arbitrary dangling pointer, orValue
using the API, and then change the contained pointer to point whereeverNone of those things require unsafe code, so this API is unsound. It could be fixed by wrapping the
enum
in another struct type, as a private field.The text was updated successfully, but these errors were encountered: