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

Fix hard crash in plOGGCodec when opening an .ogg file containing invalid data #1665

Merged
merged 3 commits into from
Feb 23, 2025

Conversation

dgelessus
Copy link
Contributor

The error handling code here was broken and tried to free a not yet initialized pointer. This PR adjusts the initialization order to fix that.

Also improved the error messages to include the specific error code returned by libvorbis, along with a description of the error code, if possible.

(The error reporting in plAudioCore could use some improvements in general. Currently, everything is reported via hsAssert, rather than returning the error message to the caller. But that is work for another time.)

Fixes a crash when an .ogg file contains invalid data, in which case
IOpen calls IClose, which would attempt to free the uninitialized
fHeadBuf pointer.
@Hoikas Hoikas merged commit 053e05e into H-uru:master Feb 23, 2025
17 checks passed
@dgelessus dgelessus deleted the fix_ogg_error_handling branch February 23, 2025 20:22
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.

2 participants