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 wrong use of reinterpret #35

Merged
merged 1 commit into from
May 17, 2017
Merged

Conversation

yuyichao
Copy link
Contributor

This is the simplest and the most local fix I can come up with. If the buffer field is not meant to be publically accessed, it is better to use a wider array and reinterpret back to UInt8 if it needs to be accessed as bytes.

@staticfloat

@staticfloat
Copy link
Member

Seems reasonable to me. Looking back, I'm kind of surprised I used reinterpret instead of Ptr for this; perhaps I just didn't know about Ptr{} back then.

@yuyichao
Copy link
Contributor Author

reinterpret is "safer". I wonder if we need a unaligned_getindex for arrays.....

@codecov-io
Copy link

codecov-io commented May 17, 2017

Codecov Report

Merging #35 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #35      +/-   ##
==========================================
+ Coverage   98.63%   98.65%   +0.01%     
==========================================
  Files           7        7              
  Lines         294      298       +4     
==========================================
+ Hits          290      294       +4     
  Misses          4        4
Impacted Files Coverage Δ
src/types.jl 100% <ø> (ø) ⬆️
src/sha3.jl 88.57% <100%> (ø) ⬆️
src/sha2.jl 100% <100%> (ø) ⬆️
src/sha1.jl 100% <100%> (ø) ⬆️
src/common.jl 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 08bfbf1...2bb0207. Read the comment docs.

@staticfloat staticfloat merged commit 337a8f7 into JuliaCrypto:master May 17, 2017
@yuyichao yuyichao deleted the align branch May 17, 2017 21:51
@tkelman
Copy link
Contributor

tkelman commented May 25, 2017

Okay to tag this?

@staticfloat
Copy link
Member

Yes.

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.

4 participants