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

Add op_fclose to keep fclose's type signature the same #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

oskarwirga
Copy link

This problem cropped up when I was trying to enable CFI-icall with Opusfile as a dependency. CFI indirect function call sanitization checks that function signatures at runtime match those that were determined at compile time. This fix ensures that fclose has the correct function signature when being passed a stream.

I have a quick sample here on Godbolt: https://godbolt.org/z/EGsPYae51

An exit code of 132 is SIGILL which means a CFI violation was found and program execution was stopped.

Context:

CFI indirect function call sanitization checks that function signatures at runtime match those that were determined at compile time. This fix ensures that fclose has the correct function signature when being passed a stream.
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.

1 participant