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

Possible NULL dereference in celt_encode_with_ec #374

Open
a1batross opened this issue Oct 27, 2024 · 2 comments
Open

Possible NULL dereference in celt_encode_with_ec #374

a1batross opened this issue Oct 27, 2024 · 2 comments

Comments

@a1batross
Copy link

opus_custom_encode calls celt_encode_with_ec with NULL passed as ec_enc *enc parameter.

In this function, ec_enc_shrink is called at https://github.com/xiph/opus/blob/main/celt/celt_encoder.c#L1596. enc variable gets initialized in branch below at https://github.com/xiph/opus/blob/main/celt/celt_encoder.c#L1607.

Unlike other branches that check for enc being NULL pointer, here it's omitted, causing a crash when st->bitrate isn't OPUS_BITRATE_MAX.

@a1batross
Copy link
Author

It seems it was broken here: 9fdc489

a1batross added a commit to FWGS/xash3d-fwgs that referenced this issue Dec 2, 2024
@SNMetamorph
Copy link

I think it's worth to post this issue on their GitLab because it seems more alive.
https://gitlab.xiph.org/xiph/opus/-/issues

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

No branches or pull requests

2 participants