Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wasmtime-c-api: Don't create slices with null pointers (bytecodeallia…
…nce#1492) It's a common idiom to pass in `NULL` for slices of zero-length in the C API, but it's not safe to create a Rust `&[T]` slice with this `NULL` pointer. Special-case this in the `as_slice()` method of incoming vectors to return an empty slice so we don't violate Rust's invariants.
- Loading branch information