google/flatbuffers

Rust: various unsafe traits/functions meant for gencode in public API

Open

#6627 aperta il 10 mag 2021

Vedi su GitHub
 (28 commenti) (2 reazioni) (0 assegnatari)C++ (3564 fork)batch import
help wantedpr-requestedrust

Metriche repository

Star
 (25.952 star)
Metriche merge PR
 (Merge medio 25g 11h) (2 PR mergiate in 30 g)

Descrizione

The following safe code will segfault:

fn main() {
    let ptr: &&u8 = flatbuffers::follow_cast_ref(&[1, 2, 3, 4, 5, 6, 7, 8], 0);
    println!("{}", **ptr);
}

Guida contributor