{
"$type": "site.standard.document",
"path": "/t/ffi-proof-slice-from-raw-parts/23971#post_9",
"publishedAt": "2026-02-05T03:41:45.000Z",
"site": "https://internals.rust-lang.org",
"tags": [
"Potential null pointer dereference with `Deref` implementation on `Buf` · Issue #1211 · rust-lang/git2-rs · GitHub"
],
"textContent": "As a data point, just this week git2 (a crate that provides libgit2 bindings) fixed a null pointer dereference when using `slice::from_raw_parts` by adding a null check: Potential null pointer dereference with `Deref` implementation on `Buf` · Issue #1211 · rust-lang/git2-rs · GitHub",
"title": "FFI-proof slice::from_raw_parts"
}