Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix MIDIPacketNext to not trigger Rust's UB check #18

Merged
merged 3 commits into from
Jun 11, 2024

Conversation

Boddlnagg
Copy link
Contributor

This should fix #17.

It also simplifies MIDIEventPacketNext, which doesn't need the platform-specific distinction, as the size is 4-byte aligned anyways (see also https://github.com/phracker/MacOSX-SDKs/blob/041600eda65c6a668f66cb7d56b7d1da3e8bcc93/MacOSX11.3.sdk/System/Library/Frameworks/CoreMIDI.framework/Versions/A/Headers/MIDIServices.h#L2387).

Note that I have not been able to test this yet!

@jonas-k jonas-k merged commit c2ff432 into jonas-k:master Jun 11, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unaligned read of MIDIPacket::length triggers UB check in recent Rust
2 participants