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 unaligned reference #61

Merged
merged 1 commit into from
Jul 9, 2021
Merged

Conversation

asquared31415
Copy link
Contributor

As described in the tracking issue, taking a reference to a field in a packed struct can cause UB. Copying the field's value when possible is preferred.

@Noxime
Copy link
Owner

Noxime commented Jul 9, 2021

Thanks for the PR! This is a good catch, I may have to rake through the code and see if there is more of these.

@Noxime Noxime merged commit d102d3f into Noxime:master Jul 9, 2021
@asquared31415
Copy link
Contributor Author

There shouldn't be any more as far as I am aware. The lint against it is warn by default, and after fixing it, the library builds without warnings.

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.

2 participants