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

Don't use unsafe.Sizeof where encoding/binary.Size suffices #1404

Merged
merged 1 commit into from
May 20, 2022
Merged

Don't use unsafe.Sizeof where encoding/binary.Size suffices #1404

merged 1 commit into from
May 20, 2022

Conversation

edef1c
Copy link
Contributor

@edef1c edef1c commented May 19, 2022

unsafe.Sizeof depends on ABI details, but we're not actually using the raw memory layout of dmveritySuperblock. We're just writing it out with encoding/binary.Write, so encoding/binary.Size gives the relevant size.

@edef1c edef1c requested a review from a team as a code owner May 19, 2022 19:11
@ghost
Copy link

ghost commented May 19, 2022

CLA assistant check
All CLA requirements met.

unsafe.Sizeof depends on ABI details, but we're not actually using the
raw memory layout of dmveritySuperblock. We're just writing it out with
encoding/binary.Write, so encoding/binary.Size gives the relevant size.

Signed-off-by: edef <[email protected]>
@anmaxvl anmaxvl merged commit be02f1d into microsoft:master May 20, 2022
@edef1c edef1c deleted the dm-verity-unsafe branch May 20, 2022 21:02
anmaxvl added a commit that referenced this pull request Feb 7, 2023
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.

3 participants