I´m about to deploy a SDK update shipping avif 0.9.0, the build fails but as this feature is currently disabled by default I think it´s fine ;) ../../Source/WebCore/platform/image-decoders/avif/AVIFImageReader.cpp:52:9: error: no matching function for call to 'avifDecoderParse' if (avifDecoderParse(m_avifDecoder.get(), &avifData) != AVIF_RESULT_OK ^~~~~~~~~~~~~~~~ /usr/include/avif/avif.h:752:21: note: candidate function not viable: requires single argument 'decoder', but 2 arguments were provided avifResult avifDecoderParse(avifDecoder * decoder); ^ ../../Source/WebCore/platform/image-decoders/avif/AVIFImageReader.cpp:75:13: error: no matching function for call to 'avifDecoderParse' if (avifDecoderParse(m_avifDecoder.get(), &avifData) != AVIF_RESULT_OK) { ^~~~~~~~~~~~~~~~ /usr/include/avif/avif.h:752:21: note: candidate function not viable: requires single argument 'decoder', but 2 arguments were provided avifResult avifDecoderParse(avifDecoder * decoder); ^ ../../Source/WebCore/platform/image-decoders/avif/AVIFImageReader.cpp:125:26: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare] for (size_t i = 0; i < m_avifDecoder->imageCount; ++i) { ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning and 2 errors generated.
Created attachment 425604 [details] Patch
Comment on attachment 425604 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=425604&action=review > Source/WebCore/platform/image-decoders/avif/AVIFImageReader.cpp:43 > + if (avifDecoderSetIOMemory(m_avifDecoder.get(), reinterpret_cast<const uint8_t*>(data.data()), data.size()) != AVIF_RESULT_OK) { Doesn't we need to check if incoming data is compatible to avif or avifs here, first?
Comment on attachment 425604 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=425604&action=review >> Source/WebCore/platform/image-decoders/avif/AVIFImageReader.cpp:43 >> + if (avifDecoderSetIOMemory(m_avifDecoder.get(), reinterpret_cast<const uint8_t*>(data.data()), data.size()) != AVIF_RESULT_OK) { > > Doesn't we need to check if incoming data is compatible to avif or avifs here, first? I don´t think so. The examples I´ve found call avifDecoderSetIOMemory() and then avifDecoderParse() which internally calls avifParse() which should hopefully handle parse errors. Do you think something additional is needed?
Committed r275880 (236445@main): <https://commits.webkit.org/236445@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 425604 [details].