Skip to content

rand v0.9.5: backport #1790#1803

Open
dhardy wants to merge 2 commits into
0.9from
push-tqkwtkvprnpn
Open

rand v0.9.5: backport #1790#1803
dhardy wants to merge 2 commits into
0.9from
push-tqkwtkvprnpn

Conversation

@dhardy

@dhardy dhardy commented Jul 2, 2026

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

Summary

Backport #1790 to rand 0.9.5.

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);

Prevent memory safety violation in `UniformChar` via deserialization.
@dhardy dhardy requested a review from tarcieri July 2, 2026 09:55
@dhardy dhardy force-pushed the push-tqkwtkvprnpn branch from 3a5d941 to c458814 Compare July 2, 2026 09:59
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