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

obu: Handle size == 0 in avifBitsInit #2145

Merged
merged 1 commit into from
May 2, 2024

Conversation

vigneshvg
Copy link
Collaborator

@vigneshvg vigneshvg commented May 2, 2024

If size == 0, eof has to be set to 1 in avifBitsInit for the
rest of the code to work as intended. Otherwise the first byte
is read unconditionally which is incorrect.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=68568

@vigneshvg vigneshvg requested a review from wantehchang May 2, 2024 22:48
src/obu.c Outdated Show resolved Hide resolved
If size == 0, eof has to be set to 1 in avifBitsInit for the
rest of the code to work as intended. Otherwise the first byte
is read unconditionally which is incorrect.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=68568
@vigneshvg vigneshvg changed the title obu: Handle obu_size == 0 case obu: Handle size == 0 in avifBitsInit May 2, 2024
@vigneshvg vigneshvg requested a review from wantehchang May 2, 2024 23:11
@vigneshvg vigneshvg merged commit 90efc1e into AOMediaCodec:main May 2, 2024
11 checks passed
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