These reviews are from cargo-vet. To add your review, set up cargo-vet and submit your URL to its registry.

The current version of malloc_buf is 1.0.0.

0.0.6 (older version) safe-to-deploy

From mozilla/supply-chain copy of hg. By Bobby Holley.

Very small crate for managing malloc-ed buffers, primarily for use in the objc crate. There is an edge-case condition that passes slice::from_raw_parts(0x1, 0) which I'm not entirely certain is technically sound, but in either case I am reasonably confident it's not exploitable.

cargo-vet does not verify reviewers' identity. You have to fully trust the source the audits are from.

safe-to-deploy (implies safe-to-run)

This crate will not introduce a serious security vulnerability to production software exposed to untrusted input. More…

Implied by other criteria

This crate can be compiled, run, and tested on a local workstation or in controlled automation without surprising consequences. More…


May have been packaged automatically without a review

This review is from Crev, a distributed system for code reviews. To add your review, set up cargo-crev.

The current version of malloc_buf is 1.0.0.

0.0.6 (older version) Rating: Strong Positive Thoroughness: High Understanding: High

by Minoru on 2021-03-11

This is a tiny wrapper over a raw pointer allocated by malloc; this crate provides a slice-like interface and ensures that the pointer is free()d when the wrapper is dropped.

This looks solid to me.

Crates in the registry are tarball snapshots uploaded by crates' publishers. The registry is not using crates' git repositories. There is absolutely no guarantee that the repository URL declared by the crate belongs to the crate, or that the code in the repository is the code inside the published tarball.

To review the actual code of the crate, it's best to use cargo crev open malloc_buf. Alternatively, you can download the tarball of malloc_buf v1.0.0 or view the source online.