Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sip hasher: fix pointer provenance problem #78484

Closed
wants to merge 1 commit into from

Conversation

RalfJung
Copy link
Member

The sip hasher code uses get_unchecked to get a reference to a particular element, but then turns that into a raw pointer and also accesses neighboring elements. Use as_ptr().add instead to avoid restricting the resulting raw pointer to a single element.

@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 28, 2020
@RalfJung
Copy link
Member Author

I found a few other similar cases in the standard library, so closing in favor of #78602.

@RalfJung RalfJung closed this Oct 31, 2020
@RalfJung RalfJung deleted the sip-provenance branch November 21, 2020 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants