Skip to content

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
Contributor

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.

3 participants