Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kimageformats for openSUSE:Factory checked in at 2021-06-16 20:33:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kimageformats (Old) and /work/SRC/openSUSE:Factory/.kimageformats.new.32437 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kimageformats" Wed Jun 16 20:33:59 2021 rev:95 rq:899741 version:5.83.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kimageformats/kimageformats.changes 2021-05-21 21:49:31.414355935 +0200 +++ /work/SRC/openSUSE:Factory/.kimageformats.new.32437/kimageformats.changes 2021-06-16 20:35:33.455193558 +0200 @@ -1,0 +2,15 @@ +Sat Jun 5 11:58:55 UTC 2021 - Christophe Giboudeaux <[email protected]> + +- Update to 5.83.0 + * New feature release + * For more details please see: + * https://kde.org/announcements/frameworks/5/5.83.0 +- Changes since 5.82.0: + * avif: Adjust for libavif breaking change + * Bump required CMake version to 3.16 + * Enable HEIC plugin to save all ICC profiles + * Color profile loading/saving fixes + * xcf: Make sure offsets are not negative + * xcf: Fix Stack-buffer-overflow WRITE on broken files + +------------------------------------------------------------------- Old: ---- kimageformats-5.82.0.tar.xz kimageformats-5.82.0.tar.xz.sig New: ---- kimageformats-5.83.0.tar.xz kimageformats-5.83.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kimageformats.spec ++++++ --- /var/tmp/diff_new_pack.4xiXWu/_old 2021-06-16 20:35:33.971194439 +0200 +++ /var/tmp/diff_new_pack.4xiXWu/_new 2021-06-16 20:35:33.975194446 +0200 @@ -22,7 +22,7 @@ %if 0%{?suse_version} > 1500 || (0%{?is_opensuse} && 0%{?sle_version} >= 150300) %define with_heif 1 %endif -%define _tar_path 5.82 +%define _tar_path 5.83 # Full KF5 version (e.g. 5.33.0) %{!?_kf5_version: %global _kf5_version %{version}} # Last major and minor KF5 version (e.g. 5.33) @@ -30,7 +30,7 @@ # Only needed for the package signature condition %bcond_without lang Name: kimageformats -Version: 5.82.0 +Version: 5.83.0 Release: 0 Summary: Image format plugins for Qt License: LGPL-2.1-or-later ++++++ kimageformats-5.82.0.tar.xz -> kimageformats-5.83.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kimageformats-5.82.0/.gitignore new/kimageformats-5.83.0/.gitignore --- old/kimageformats-5.82.0/.gitignore 2021-05-02 11:51:43.000000000 +0200 +++ new/kimageformats-5.83.0/.gitignore 2021-06-05 10:55:28.000000000 +0200 @@ -25,3 +25,4 @@ .clangd .idea /cmake-build* +.cache diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kimageformats-5.82.0/CMakeLists.txt new/kimageformats-5.83.0/CMakeLists.txt --- old/kimageformats-5.82.0/CMakeLists.txt 2021-05-02 11:51:43.000000000 +0200 +++ new/kimageformats-5.83.0/CMakeLists.txt 2021-06-05 10:55:28.000000000 +0200 @@ -1,11 +1,11 @@ -cmake_minimum_required(VERSION 3.6) +cmake_minimum_required(VERSION 3.16) project(KImageFormats) set (CMAKE_CXX_STANDARD 14) include(FeatureSummary) -find_package(ECM 5.82.0 NO_MODULE) +find_package(ECM 5.83.0 NO_MODULE) set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules") feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) @@ -65,7 +65,6 @@ endif() add_feature_info(LibHeif LibHeif_FOUND "required for the QImage plugin for HEIF/HEIC images") -add_definitions(-DQT_NO_FOREACH) # 050d00 (5.13) triggers a BIC in qimageiohandler.h, in Qt 5.13, so do not enable that until we can require 5.14 # https://codereview.qt-project.org/c/qt/qtbase/+/279215 add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f00) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kimageformats-5.82.0/src/imageformats/avif.cpp new/kimageformats-5.83.0/src/imageformats/avif.cpp --- old/kimageformats-5.82.0/src/imageformats/avif.cpp 2021-05-02 11:51:43.000000000 +0200 +++ new/kimageformats-5.83.0/src/imageformats/avif.cpp 2021-06-05 10:55:28.000000000 +0200 @@ -190,10 +190,12 @@ return false; } + QColorSpace colorspace; if (m_decoder->image->icc.data && (m_decoder->image->icc.size > 0)) { - result.setColorSpace(QColorSpace::fromIccProfile(QByteArray::fromRawData((const char *)m_decoder->image->icc.data, (int)m_decoder->image->icc.size))); - if (!result.colorSpace().isValid()) { - qWarning("Invalid QColorSpace created from ICC!"); + const QByteArray icc_data((const char *)m_decoder->image->icc.data, (int)m_decoder->image->icc.size); + colorspace = QColorSpace::fromIccProfile(icc_data); + if (!colorspace.isValid()) { + qWarning("AVIF image has Qt-unsupported or invalid ICC profile!"); } } else { float prim[8] = {0.64f, 0.33f, 0.3f, 0.6f, 0.15f, 0.06f, 0.3127f, 0.329f}; @@ -243,23 +245,25 @@ case 0: case 1: case 2: /* AVIF_COLOR_PRIMARIES_UNSPECIFIED */ - result.setColorSpace(QColorSpace(QColorSpace::Primaries::SRgb, q_trc, q_trc_gamma)); + colorspace = QColorSpace(QColorSpace::Primaries::SRgb, q_trc, q_trc_gamma); break; /* AVIF_COLOR_PRIMARIES_SMPTE432 */ case 12: - result.setColorSpace(QColorSpace(QColorSpace::Primaries::DciP3D65, q_trc, q_trc_gamma)); + colorspace = QColorSpace(QColorSpace::Primaries::DciP3D65, q_trc, q_trc_gamma); break; default: - result.setColorSpace(QColorSpace(whitePoint, redPoint, greenPoint, bluePoint, q_trc, q_trc_gamma)); + colorspace = QColorSpace(whitePoint, redPoint, greenPoint, bluePoint, q_trc, q_trc_gamma); break; } } - if (!result.colorSpace().isValid()) { - qWarning("Invalid QColorSpace created from NCLX/CICP!"); + if (!colorspace.isValid()) { + qWarning("AVIF plugin created invalid QColorSpace from NCLX/CICP!"); } } + result.setColorSpace(colorspace); + avifRGBImage rgb; avifRGBImageSetDefaults(&rgb, m_decoder->image); @@ -357,11 +361,15 @@ } if (m_decoder->image->transformFlags & AVIF_TRANSFORM_IMIR) { +#if AVIF_VERSION > 90100 + switch (m_decoder->image->imir.mode) { +#else switch (m_decoder->image->imir.axis) { - case 0: // vertical +#endif + case 0: // top-to-bottom result = result.mirrored(false, true); break; - case 1: // horizontal + case 1: // left-to-right result = result.mirrored(true, false); break; } @@ -545,6 +553,7 @@ avifColorPrimaries primaries_to_save = (avifColorPrimaries)2; avifTransferCharacteristics transfer_to_save = (avifTransferCharacteristics)2; + QByteArray iccprofile; if (tmpcolorimage.colorSpace().isValid()) { switch (tmpcolorimage.colorSpace().primaries()) { @@ -636,13 +645,23 @@ tmpcolorimage.convertToColorSpace(QColorSpace(QColorSpace::Primaries::SRgb, QColorSpace::TransferFunction::SRgb)); } } + } else { // profile is unsupported by Qt + iccprofile = tmpcolorimage.colorSpace().iccProfile(); + if (iccprofile.size() > 0) { + matrix_to_save = (avifMatrixCoefficients)6; + } } + avif = avifImageCreate(tmpcolorimage.width(), tmpcolorimage.height(), save_depth, pixel_format); avif->matrixCoefficients = matrix_to_save; avif->colorPrimaries = primaries_to_save; avif->transferCharacteristics = transfer_to_save; + if (iccprofile.size() > 0) { + avifImageSetProfileICC(avif, (const uint8_t *)iccprofile.constData(), iccprofile.size()); + } + avifRGBImage rgb; avifRGBImageSetDefaults(&rgb, avif); rgb.rowBytes = tmpcolorimage.bytesPerLine(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kimageformats-5.82.0/src/imageformats/heif.cpp new/kimageformats-5.83.0/src/imageformats/heif.cpp --- old/kimageformats-5.82.0/src/imageformats/heif.cpp 2021-05-02 11:51:43.000000000 +0200 +++ new/kimageformats-5.83.0/src/imageformats/heif.cpp 2021-06-05 10:55:28.000000000 +0200 @@ -137,12 +137,10 @@ heif::Image heifImage; heifImage.create(tmpimage.width(), tmpimage.height(), heif_colorspace_RGB, chroma); - if (tmpimage.colorSpace().isValid()) { - QByteArray iccprofile = tmpimage.colorSpace().iccProfile(); - if (iccprofile.size() > 0) { - std::vector<uint8_t> rawProfile(iccprofile.begin(), iccprofile.end()); - heifImage.set_raw_color_profile(heif_color_profile_type_prof, rawProfile); - } + QByteArray iccprofile = tmpimage.colorSpace().iccProfile(); + if (iccprofile.size() > 0) { + std::vector<uint8_t> rawProfile(iccprofile.begin(), iccprofile.end()); + heifImage.set_raw_color_profile(heif_color_profile_type_prof, rawProfile); } heifImage.add_plane(heif_channel_interleaved, image.width(), image.height(), save_depth); @@ -617,7 +615,7 @@ } else { m_current_image.setColorSpace(QColorSpace::fromIccProfile(ba)); if (!m_current_image.colorSpace().isValid()) { - qWarning() << "icc profile is invalid"; + qWarning() << "HEIC image has Qt-unsupported or invalid ICC profile!"; } } } else { @@ -679,7 +677,7 @@ heif_nclx_color_profile_free(nclx); if (!m_current_image.colorSpace().isValid()) { - qWarning() << "invalid color profile created from NCLX"; + qWarning() << "HEIC plugin created invalid QColorSpace from NCLX!"; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kimageformats-5.82.0/src/imageformats/xcf.cpp new/kimageformats-5.83.0/src/imageformats/xcf.cpp --- old/kimageformats-5.82.0/src/imageformats/xcf.cpp 2021-05-02 11:51:43.000000000 +0200 +++ new/kimageformats-5.83.0/src/imageformats/xcf.cpp 2021-06-05 10:55:28.000000000 +0200 @@ -627,12 +627,17 @@ QStack<qint64> layer_offsets; while (true) { - qint64 layer_offset = readOffsetPtr(xcf_io); + const qint64 layer_offset = readOffsetPtr(xcf_io); if (layer_offset == 0) { break; } + if (layer_offset < 0) { + qCDebug(XCFPLUGIN) << "XCF: negative layer offset"; + return false; + } + layer_offsets.push(layer_offset); } @@ -889,6 +894,16 @@ layer.hierarchy_offset = readOffsetPtr(xcf_io); layer.mask_offset = readOffsetPtr(xcf_io); + if (layer.hierarchy_offset < 0) { + qCDebug(XCFPLUGIN) << "XCF: negative layer hierarchy_offset"; + return false; + } + + if (layer.mask_offset < 0) { + qCDebug(XCFPLUGIN) << "XCF: negative layer mask_offset"; + return false; + } + // Allocate the individual tile QImages based on the size and type // of this layer. @@ -1304,10 +1319,15 @@ quint32 bpp; xcf_io >> width >> height >> bpp; - qint64 offset = readOffsetPtr(xcf_io); + const qint64 offset = readOffsetPtr(xcf_io); qCDebug(XCFPLUGIN) << "width" << width << "height" << height << "bpp" << bpp << "offset" << offset; + if (offset < 0) { + qCDebug(XCFPLUGIN) << "XCF: negative hierarchy offset"; + return false; + } + const bool isMask = layer.assignBytes == assignMaskBytes; // make sure bpp is correct and complain if it is not @@ -1408,6 +1428,11 @@ xcf_io >> width >> height; qint64 offset = readOffsetPtr(xcf_io); + if (offset < 0) { + qCDebug(XCFPLUGIN) << "XCF: negative level offset"; + return false; + } + if (offset == 0) { // offset 0 with rowsxcols != 0 is probably an error since it means we have tiles // without data but just clear the bits for now instead of returning false @@ -1432,6 +1457,11 @@ qint64 saved_pos = xcf_io.device()->pos(); qint64 offset2 = readOffsetPtr(xcf_io); + if (offset2 < 0) { + qCDebug(XCFPLUGIN) << "XCF: negative level offset"; + return false; + } + // Evidently, RLE can occasionally expand a tile instead of compressing it! if (offset2 == 0) { offset2 = offset + (uint)(TILE_WIDTH * TILE_HEIGHT * 4 * 1.5); @@ -1477,6 +1507,11 @@ xcf_io.device()->seek(saved_pos); offset = readOffsetPtr(xcf_io); + + if (offset < 0) { + qCDebug(XCFPLUGIN) << "XCF: negative level offset"; + return false; + } } } @@ -1503,7 +1538,12 @@ return false; } - qint64 hierarchy_offset = readOffsetPtr(xcf_io); + const qint64 hierarchy_offset = readOffsetPtr(xcf_io); + + if (hierarchy_offset < 0) { + qCDebug(XCFPLUGIN) << "XCF: negative mask hierarchy_offset"; + return false; + } xcf_io.device()->seek(hierarchy_offset); layer.assignBytes = assignMaskBytes;
