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

Code cleanups; RUSTSEC/CVE fix #21

Merged
merged 3 commits into from
May 14, 2020
Merged

Conversation

BartMassey
Copy link
Collaborator

  • First patch: bring the code up to date with the current ecosystem. (Unfortunately this requires bumping the minimum required version of bitflags to at least 1.0.)

  • Second patch: attempt to fix the RUSTSEC/CVE issue noted in Issue Stream callback procedure is not unwind safe #20. This patch could use a careful audit to ensure I understood the vulnerability and the fix.

Thanks much for portaudio-rs. I'm using it in projects and really happy with it.

* Bumped bitflags version to > 1 to avoid try!()
  warnings. Edited bitflags code for compatibility.

* Replaced mem_transmute() with Box::from_raw() in stream.rs as suggested by
  comments there.

* Cleaned up all compiler warnings.

* Cleaned up all Clippy warnings.
Two uses of mem::forget() after user callbacks were replaced
with Box::leak() before the user callbacks to ensure that
unowned memory was not improperly freed on panic.
@BartMassey
Copy link
Collaborator Author

Oops. Had forgotten to look at the examples. Those are cleaned up by the third patch.

@mvdnes
Copy link
Owner

mvdnes commented May 14, 2020

Looks good to me, thanks! 👍

@mvdnes mvdnes merged commit 7466df0 into mvdnes:master May 14, 2020
# 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.

2 participants