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 fuzzer following gain map API changes #2405

Merged
merged 4 commits into from
Aug 22, 2024

Conversation

maryla-uc
Copy link
Collaborator

And a little bit of gain map reading cleanup in read.c (assume enableParsingGainMapMetadata is true in avifDecoderFindGainMapItem)

@wantehchang wantehchang requested a review from y-guyon August 21, 2024 22:33
Copy link
Collaborator

@wantehchang wantehchang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maryla: Please wait for Yannis's review because he reviewed your recent gain map pull requests.

if (tmapParsingRes == AVIF_RESULT_NOT_IMPLEMENTED) {
// Unsupported gain map version. Simply ignore the gain map.
avifGainMapDestroy(decoder->image->gainMap);
decoder->image->gainMap = NULL;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we return from the AVIF_CHECKRES at line 5428, is decoder->image->gainMap guaranteed to be NULL?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If AVIF_CHECKRES returns an error, decoder->image->gainMap might be set even if gainMapPresent is false (inconsistent state). But If the function returns an error, it doesn't have to guarantee anything about the output, does it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fact that consistency is not guaranteed is not new and was already the case before this patch so I will submit for now and we can revisit in another patch if needed.

@maryla-uc maryla-uc merged commit 9be2966 into AOMediaCodec:main Aug 22, 2024
15 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.

3 participants