CVE: CVE-2023-47997 Upstream: https://src.fedoraproject.org/rpms/freeimage/raw/rawhide/f/CVE-2023-47997.patch Signed-off-by: Thomas Perale --- diff -rupN a/Source/FreeImage/PluginTIFF.cpp b/Source/FreeImage/PluginTIFF.cpp --- a/Source/FreeImage/PluginTIFF.cpp +++ b/Source/FreeImage/PluginTIFF.cpp @@ -1444,6 +1444,12 @@ Load(FreeImageIO *io, fi_handle handle, (int)bitspersample, (int)samplesperpixel, (int)photometric); throw (char*)NULL; } + if (planar_config == PLANARCONFIG_SEPARATE && bitspersample < 8) { + FreeImage_OutputMessageProc(s_format_id, + "Unable to handle this format: bitspersample = 8, TIFFTAG_PLANARCONFIG = PLANARCONFIG_SEPARATE" + ); + throw (char*)NULL; + } // ---------------------------------------------------------------------------------