Skip to content

Commit

Permalink
Fix soundness hole in Ref::into_ref and into_mut (#721) (#726)
Browse files Browse the repository at this point in the history
This commit implements the fix for #716 which will be released as a new
version in version trains 0.2, 0.3, 0.4, 0.5, 0.6, and 0.7. See #716 for
a description of the soundness hole and an explanation of why this fix
is chosen.

Unfortunately, due to dtolnay/trybuild#241, there is no way for us to
write a UI test that will detect a failure post-monomorphization, which
is when the code implemented in this change is designed to fail. I have
manually verified that unsound uses of these APIs now fail to compile.

Release 0.3.2.
  • Loading branch information
joshlf committed Dec 14, 2023
1 parent 2c37bbe commit 50032ba
Show file tree
Hide file tree
Showing 4 changed files with 299 additions and 75 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml.crates-io → Cargo.toml
Expand Up @@ -7,7 +7,7 @@
[package]
edition = "2018"
name = "zerocopy"
version = "0.3.1"
version = "0.3.2"
authors = ["Joshua Liebow-Feeser <joshlf@google.com>"]
description = "Utilities for zero-copy parsing and serialization"
license = "BSD-3-Clause"
Expand Down

0 comments on commit 50032ba

Please sign in to comment.