Closed helgoboss closed 2 years ago
Thanks for taking the time to debug and fix this. Unfortunately, the new From
implementation in this PR is still unsound, since you can manually construct an api::Event
with event_type
set to SysEx
, and from
will read out of bounds regardless of whether a valid reference to a SysExEvent
was passed (and, even in the case where it's a valid SysExEvent
, you can pass arbitrary values for the data pointer and size). Would you mind replacing the From
impl with something like unsafe fn from_raw_event(*mut api::Event) -> Event<'a>
, with a comment outlining the safety requirements?
Sure, that makes sense. Probably after the weekend.
... or today :) Feel free to suggest different wording.
Awesome, thanks! Looks good to me.
Tested on REAPER win64.