-
Notifications
You must be signed in to change notification settings - Fork 213
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
Conversation
There was a problem hiding this 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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
And a little bit of gain map reading cleanup in read.c (assume enableParsingGainMapMetadata is true in avifDecoderFindGainMapItem)