opusfile
opusfile copied to clipboard
Add op_fclose to keep fclose's type signature the same
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.