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

Fix argument to copy_nonoverlapping in internal_macros #45

Merged
merged 1 commit into from Feb 14, 2018

Conversation

TheBlueMatt
Copy link
Member

This resolves a segfault due to unsafe code.

This resolves a segfault due to unsafe code.
@apoelstra
Copy link
Member

At the very least this should be $len * mem::size_of::<$ty>; your fix will only work for u8 arrays. But I don't understand why the old code was incorrect.

@TheBlueMatt
Copy link
Member Author

copy_nonoverlapping multiplies count by the size of the type being copied, ie does "count * size_of" for you.

@apoelstra
Copy link
Member

Derp. thanks.

@apoelstra apoelstra merged commit deda031 into rust-bitcoin:master Feb 14, 2018
apoelstra referenced this pull request in rust-bitcoin/rust-secp256k1 Feb 14, 2018
Tibo-lg pushed a commit to p2pderivatives/rust-bitcoin that referenced this pull request Sep 1, 2020
Fix two more sha256d::Hash argument nits
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.

None yet

2 participants