Skip to content

rand v0.8.7: backport #1790#1804

Open
dhardy wants to merge 2 commits into
0.8from
push-oopmwuukvqlm
Open

rand v0.8.7: backport #1790#1804
dhardy wants to merge 2 commits into
0.8from
push-oopmwuukvqlm

Conversation

@dhardy

@dhardy dhardy commented Jul 2, 2026

Copy link
Copy Markdown
Member
  • Added a CHANGELOG.md entry

Summary

Backport #1790 to rand 0.8.7.

Motivation

This changes address an unsoundness issue: code like the following could yield a Distribution object yielding invalid char values when sampled (unsound):

        let json = r#"{"sampler":{"low":4294967200,"range":0,"thresh":0}}"#;
        let result = serde_json::from_str::<Uniform<char>>(json);

@dhardy dhardy requested a review from tarcieri July 2, 2026 10:02
dhardy added 2 commits July 3, 2026 07:56
Prevent memory safety violation in `UniformChar` via deserialization.
@dhardy dhardy force-pushed the push-oopmwuukvqlm branch from 4e1a67e to b3e2b84 Compare July 3, 2026 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant