Hello community,

here is the log from the commit of package kimageformats for openSUSE:Factory 
checked in at 2019-05-21 10:29:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kimageformats (Old)
 and      /work/SRC/openSUSE:Factory/.kimageformats.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kimageformats"

Tue May 21 10:29:11 2019 rev:68 rq:703357 version:5.58.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kimageformats/kimageformats.changes      
2019-04-19 21:22:58.579766648 +0200
+++ /work/SRC/openSUSE:Factory/.kimageformats.new.5148/kimageformats.changes    
2019-05-21 10:29:17.027462417 +0200
@@ -1,0 +2,19 @@
+Wed May 15 18:16:17 UTC 2019 - [email protected]
+
+- Update to 5.58.0
+  * New feature release
+  * For more details please see:
+  * https://www.kde.org/announcements/kde-frameworks-5.58.0.php
+- Changes since 5.57.0:
+  * tga: don't try to read more than max_palette_size into palette
+  * tga: memset dst if read fails
+  * tga: memset the whole palette array, not only the palette_size
+  * Initialize the unread bits of _starttab
+  * xcf: Fix uninitialized memory use on broken documents
+  * ras: Don't overread input on malformed files
+  * xcf: layer is const in copy and merge, mark it as such
+  * No & is a bit faster here
+  * const & is a bit faster here
+  * QStringLiteral is a bit faster here
+
+-------------------------------------------------------------------

Old:
----
  kimageformats-5.57.0.tar.xz

New:
----
  kimageformats-5.58.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kimageformats.spec ++++++
--- /var/tmp/diff_new_pack.RaewnT/_old  2019-05-21 10:29:18.111462001 +0200
+++ /var/tmp/diff_new_pack.RaewnT/_new  2019-05-21 10:29:18.115461999 +0200
@@ -16,13 +16,13 @@
 #
 
 
-%define _tar_path 5.57
+%define _tar_path 5.58
 # Full KF5 version (e.g. 5.33.0)
 %{!?_kf5_version: %global _kf5_version %{version}}
 # Last major and minor KF5 version (e.g. 5.33)
 %{!?_kf5_bugfix_version: %define _kf5_bugfix_version %(echo %{_kf5_version} | 
awk -F. '{print $1"."$2}')}
 Name:           kimageformats
-Version:        5.57.0
+Version:        5.58.0
 Release:        0
 Summary:        Image format plugins for Qt
 License:        LGPL-2.1-or-later

++++++ kimageformats-5.57.0.tar.xz -> kimageformats-5.58.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kimageformats-5.57.0/CMakeLists.txt 
new/kimageformats-5.58.0/CMakeLists.txt
--- old/kimageformats-5.57.0/CMakeLists.txt     2019-04-07 09:18:46.000000000 
+0200
+++ new/kimageformats-5.58.0/CMakeLists.txt     2019-05-05 00:44:00.000000000 
+0200
@@ -3,7 +3,7 @@
 project(KImageFormats)
 
 include(FeatureSummary)
-find_package(ECM 5.57.0  NO_MODULE)
+find_package(ECM 5.58.0  NO_MODULE)
 set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake 
Modules." URL 
"https://projects.kde.org/projects/kdesupport/extra-cmake-modules";)
 feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND 
FATAL_ON_MISSING_REQUIRED_PACKAGES)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kimageformats-5.57.0/src/imageformats/exr.cpp 
new/kimageformats-5.58.0/src/imageformats/exr.cpp
--- old/kimageformats-5.57.0/src/imageformats/exr.cpp   2019-04-07 
09:18:46.000000000 +0200
+++ new/kimageformats-5.58.0/src/imageformats/exr.cpp   2019-05-05 
00:44:00.000000000 +0200
@@ -82,7 +82,7 @@
  * format into the normal 32 bit pixel format. Process is from the
  * ILM code.
  */
-QRgb RgbaToQrgba(struct Imf::Rgba imagePixel)
+QRgb RgbaToQrgba(struct Imf::Rgba &imagePixel)
 {
     float r, g, b, a;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kimageformats-5.57.0/src/imageformats/kra.cpp 
new/kimageformats-5.58.0/src/imageformats/kra.cpp
--- old/kimageformats-5.57.0/src/imageformats/kra.cpp   2019-04-07 
09:18:46.000000000 +0200
+++ new/kimageformats-5.58.0/src/imageformats/kra.cpp   2019-05-05 
00:44:00.000000000 +0200
@@ -39,7 +39,7 @@
     KZip zip(device());
     if (!zip.open(QIODevice::ReadOnly)) return false;
 
-    const KArchiveEntry *entry = 
zip.directory()->entry(QLatin1String("mergedimage.png"));
+    const KArchiveEntry *entry = 
zip.directory()->entry(QStringLiteral("mergedimage.png"));
     if (!entry || !entry->isFile()) return false;
 
     const KZipFileEntry* fileZipEntry = static_cast<const 
KZipFileEntry*>(entry);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kimageformats-5.57.0/src/imageformats/ora.cpp 
new/kimageformats-5.58.0/src/imageformats/ora.cpp
--- old/kimageformats-5.57.0/src/imageformats/ora.cpp   2019-04-07 
09:18:46.000000000 +0200
+++ new/kimageformats-5.58.0/src/imageformats/ora.cpp   2019-05-05 
00:44:00.000000000 +0200
@@ -38,7 +38,7 @@
     KZip zip(device());
     if (!zip.open(QIODevice::ReadOnly)) return false;
 
-    const KArchiveEntry *entry = 
zip.directory()->entry(QLatin1String("mergedimage.png"));
+    const KArchiveEntry *entry = 
zip.directory()->entry(QStringLiteral("mergedimage.png"));
     if (!entry || !entry->isFile()) return false;
 
     const KZipFileEntry* fileZipEntry = static_cast<const 
KZipFileEntry*>(entry);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kimageformats-5.57.0/src/imageformats/pcx.cpp 
new/kimageformats-5.58.0/src/imageformats/pcx.cpp
--- old/kimageformats-5.57.0/src/imageformats/pcx.cpp   2019-04-07 
09:18:46.000000000 +0200
+++ new/kimageformats-5.58.0/src/imageformats/pcx.cpp   2019-05-05 
00:44:00.000000000 +0200
@@ -23,7 +23,7 @@
     quint8 g;
     quint8 b;
 
-    static RGB from(const QRgb &color)
+    static RGB from(const QRgb color)
     {
         RGB c;
         c.r = qRed(color);
@@ -169,7 +169,7 @@
     return s;
 }
 
-static QDataStream &operator<<(QDataStream &s, const RGB &rgb)
+static QDataStream &operator<<(QDataStream &s, const RGB rgb)
 {
     s << rgb.r << rgb.g << rgb.b;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kimageformats-5.57.0/src/imageformats/ras.cpp 
new/kimageformats-5.58.0/src/imageformats/ras.cpp
--- old/kimageformats-5.57.0/src/imageformats/ras.cpp   2019-04-07 
09:18:46.000000000 +0200
+++ new/kimageformats-5.58.0/src/imageformats/ras.cpp   2019-05-05 
00:44:00.000000000 +0200
@@ -143,7 +143,7 @@
     QVector<quint8> input(ras.Length);
 
     int i = 0;
-    while (! s.atEnd()) {
+    while (! s.atEnd() && i < input.size()) {
         s >> input[i];
         // I guess we need to find out if we're at the end of a line
         if (paddingrequired && i != 0 && !(i % (ras.Width * bpp))) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kimageformats-5.57.0/src/imageformats/rgb.cpp 
new/kimageformats-5.58.0/src/imageformats/rgb.cpp
--- old/kimageformats-5.57.0/src/imageformats/rgb.cpp   2019-04-07 
09:18:46.000000000 +0200
+++ new/kimageformats-5.58.0/src/imageformats/rgb.cpp   2019-05-05 
00:44:00.000000000 +0200
@@ -336,6 +336,9 @@
             _stream >> _starttab[l];
             _starttab[l] -= 512 + _numrows * 2 * sizeof(quint32);
         }
+        for (; l < _numrows; l++) {
+            _starttab[l] = 0;
+        }
 
         _lengthtab = new quint32[_numrows];
         for (l = 0; l < _numrows; l++) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kimageformats-5.57.0/src/imageformats/tga.cpp 
new/kimageformats-5.58.0/src/imageformats/tga.cpp
--- old/kimageformats-5.57.0/src/imageformats/tga.cpp   2019-04-07 
09:18:46.000000000 +0200
+++ new/kimageformats-5.58.0/src/imageformats/tga.cpp   2019-05-05 
00:44:00.000000000 +0200
@@ -201,16 +201,20 @@
     }
 
     // Read palette.
-    char palette[768];
+    static const int max_palette_size = 768;
+    char palette[max_palette_size];
     if (info.pal) {
         // @todo Support palettes in other formats!
-        const int size = 3 * tga.colormap_length;
-        const int dataRead = s.readRawData(palette, size);
+        const int palette_size = 3 * tga.colormap_length;
+        if (palette_size > max_palette_size) {
+            return false;
+        }
+        const int dataRead = s.readRawData(palette, palette_size);
         if (dataRead < 0) {
             return false;
         }
-        if (dataRead < size) {
-            memset(&palette[dataRead], 0, size - dataRead);
+        if (dataRead < max_palette_size) {
+            memset(&palette[dataRead], 0, max_palette_size - dataRead);
         }
     }
 
@@ -256,7 +260,14 @@
             } else {
                 // Raw pixels.
                 count *= pixel_size;
-                s.readRawData(dst, count);
+                const int dataRead = s.readRawData(dst, count);
+                if (dataRead < 0) {
+                    free(image);
+                    return false;
+                }
+                if ((uint)dataRead < count) {
+                    memset(&dst[dataRead], 0, count - dataRead);
+                }
                 dst += count;
             }
         }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kimageformats-5.57.0/src/imageformats/xcf.cpp 
new/kimageformats-5.58.0/src/imageformats/xcf.cpp
--- old/kimageformats-5.57.0/src/imageformats/xcf.cpp   2019-04-07 
09:18:46.000000000 +0200
+++ new/kimageformats-5.58.0/src/imageformats/xcf.cpp   2019-05-05 
00:44:00.000000000 +0200
@@ -167,11 +167,11 @@
 
     //! The bottom-most layer is copied into the final QImage by this
     //! routine.
-    typedef void (*PixelCopyOperation)(Layer &layer, uint i, uint j, int k, 
int l,
+    typedef void (*PixelCopyOperation)(const Layer &layer, uint i, uint j, int 
k, int l,
                                        QImage &image, int m, int n);
 
     //! Higher layers are merged into the final QImage by this routine.
-    typedef void (*PixelMergeOperation)(Layer &layer, uint i, uint j, int k, 
int l,
+    typedef void (*PixelMergeOperation)(const Layer &layer, uint i, uint j, 
int k, int l,
                                         QImage &image, int m, int n);
 
     //! Layer mode static data.
@@ -201,37 +201,37 @@
                      int data_length, qint32 bpp);
 
     static void copyLayerToImage(XCFImage &xcf_image);
-    static void copyRGBToRGB(Layer &layer, uint i, uint j, int k, int l,
+    static void copyRGBToRGB(const Layer &layer, uint i, uint j, int k, int l,
                              QImage &image, int m, int n);
-    static void copyGrayToGray(Layer &layer, uint i, uint j, int k, int l,
+    static void copyGrayToGray(const Layer &layer, uint i, uint j, int k, int 
l,
                                QImage &image, int m, int n);
-    static void copyGrayToRGB(Layer &layer, uint i, uint j, int k, int l,
+    static void copyGrayToRGB(const Layer &layer, uint i, uint j, int k, int l,
                               QImage &image, int m, int n);
-    static void copyGrayAToRGB(Layer &layer, uint i, uint j, int k, int l,
+    static void copyGrayAToRGB(const Layer &layer, uint i, uint j, int k, int 
l,
                                QImage &image, int m, int n);
-    static void copyIndexedToIndexed(Layer &layer, uint i, uint j, int k, int 
l,
+    static void copyIndexedToIndexed(const Layer &layer, uint i, uint j, int 
k, int l,
                                      QImage &image, int m, int n);
-    static void copyIndexedAToIndexed(Layer &layer, uint i, uint j, int k, int 
l,
+    static void copyIndexedAToIndexed(const Layer &layer, uint i, uint j, int 
k, int l,
                                       QImage &image, int m, int n);
-    static void copyIndexedAToRGB(Layer &layer, uint i, uint j, int k, int l,
+    static void copyIndexedAToRGB(const Layer &layer, uint i, uint j, int k, 
int l,
                                   QImage &image, int m, int n);
 
     static void mergeLayerIntoImage(XCFImage &xcf_image);
-    static void mergeRGBToRGB(Layer &layer, uint i, uint j, int k, int l,
+    static void mergeRGBToRGB(const Layer &layer, uint i, uint j, int k, int l,
                               QImage &image, int m, int n);
-    static void mergeGrayToGray(Layer &layer, uint i, uint j, int k, int l,
+    static void mergeGrayToGray(const Layer &layer, uint i, uint j, int k, int 
l,
                                 QImage &image, int m, int n);
-    static void mergeGrayAToGray(Layer &layer, uint i, uint j, int k, int l,
+    static void mergeGrayAToGray(const Layer &layer, uint i, uint j, int k, 
int l,
                                  QImage &image, int m, int n);
-    static void mergeGrayToRGB(Layer &layer, uint i, uint j, int k, int l,
+    static void mergeGrayToRGB(const Layer &layer, uint i, uint j, int k, int 
l,
                                QImage &image, int m, int n);
-    static void mergeGrayAToRGB(Layer &layer, uint i, uint j, int k, int l,
+    static void mergeGrayAToRGB(const Layer &layer, uint i, uint j, int k, int 
l,
                                 QImage &image, int m, int n);
-    static void mergeIndexedToIndexed(Layer &layer, uint i, uint j, int k, int 
l,
+    static void mergeIndexedToIndexed(const Layer &layer, uint i, uint j, int 
k, int l,
                                       QImage &image, int m, int n);
-    static void mergeIndexedAToIndexed(Layer &layer, uint i, uint j, int k, 
int l,
+    static void mergeIndexedAToIndexed(const Layer &layer, uint i, uint j, int 
k, int l,
                                        QImage &image, int m, int n);
-    static void mergeIndexedAToRGB(Layer &layer, uint i, uint j, int k, int l,
+    static void mergeIndexedAToRGB(const Layer &layer, uint i, uint j, int k, 
int l,
                                    QImage &image, int m, int n);
 
     static void initializeRandomTable();
@@ -276,7 +276,7 @@
 };
 
 //! Change a QRgb value's alpha only.
-inline QRgb qRgba(const QRgb &rgb, int a)
+inline QRgb qRgba(const QRgb rgb, int a)
 {
     return ((a & 0xff) << 24 | (rgb & RGB_MASK));
 }
@@ -1078,6 +1078,9 @@
         for (uint j = 0; j < layer.nrows; j++) {
             for (uint i = 0; i < layer.ncols; i++) {
                 layer.image_tiles[j][i].fill(Qt::transparent);
+                if (layer.type == GRAYA_GIMAGE || layer.type == 
INDEXEDA_GIMAGE) {
+                    layer.alpha_tiles[j][i].fill(Qt::transparent);
+                }
             }
         }
         return true;
@@ -1640,7 +1643,7 @@
  * \param m x pixel of destination image.
  * \param n y pixel of destination image.
  */
-void XCFImageFormat::copyRGBToRGB(Layer &layer, uint i, uint j, int k, int l,
+void XCFImageFormat::copyRGBToRGB(const Layer &layer, uint i, uint j, int k, 
int l,
                                   QImage &image, int m, int n)
 {
     QRgb src = layer.image_tiles[j][i].pixel(k, l);
@@ -1671,7 +1674,7 @@
  * \param m x pixel of destination image.
  * \param n y pixel of destination image.
  */
-void XCFImageFormat::copyGrayToGray(Layer &layer, uint i, uint j, int k, int l,
+void XCFImageFormat::copyGrayToGray(const Layer &layer, uint i, uint j, int k, 
int l,
                                     QImage &image, int m, int n)
 {
     int src = layer.image_tiles[j][i].pixelIndex(k, l);
@@ -1691,7 +1694,7 @@
  * \param m x pixel of destination image.
  * \param n y pixel of destination image.
  */
-void XCFImageFormat::copyGrayToRGB(Layer &layer, uint i, uint j, int k, int l,
+void XCFImageFormat::copyGrayToRGB(const Layer &layer, uint i, uint j, int k, 
int l,
                                    QImage &image, int m, int n)
 {
     QRgb src = layer.image_tiles[j][i].pixel(k, l);
@@ -1712,7 +1715,7 @@
  * \param m x pixel of destination image.
  * \param n y pixel of destination image.
  */
-void XCFImageFormat::copyGrayAToRGB(Layer &layer, uint i, uint j, int k, int l,
+void XCFImageFormat::copyGrayAToRGB(const Layer &layer, uint i, uint j, int k, 
int l,
                                     QImage &image, int m, int n)
 {
     QRgb src = layer.image_tiles[j][i].pixel(k, l);
@@ -1740,7 +1743,7 @@
  * \param m x pixel of destination image.
  * \param n y pixel of destination image.
  */
-void XCFImageFormat::copyIndexedToIndexed(Layer &layer, uint i, uint j, int k, 
int l,
+void XCFImageFormat::copyIndexedToIndexed(const Layer &layer, uint i, uint j, 
int k, int l,
         QImage &image, int m, int n)
 {
     int src = layer.image_tiles[j][i].pixelIndex(k, l);
@@ -1758,7 +1761,7 @@
  * \param m x pixel of destination image.
  * \param n y pixel of destination image.
  */
-void XCFImageFormat::copyIndexedAToIndexed(Layer &layer, uint i, uint j, int 
k, int l,
+void XCFImageFormat::copyIndexedAToIndexed(const Layer &layer, uint i, uint j, 
int k, int l,
         QImage &image, int m, int n)
 {
     uchar src = layer.image_tiles[j][i].pixelIndex(k, l);
@@ -1793,7 +1796,7 @@
  * \param m x pixel of destination image.
  * \param n y pixel of destination image.
  */
-void XCFImageFormat::copyIndexedAToRGB(Layer &layer, uint i, uint j, int k, 
int l,
+void XCFImageFormat::copyIndexedAToRGB(const Layer &layer, uint i, uint j, int 
k, int l,
                                        QImage &image, int m, int n)
 {
     QRgb src = layer.image_tiles[j][i].pixel(k, l);
@@ -1930,7 +1933,7 @@
  * \param m x pixel of destination image.
  * \param n y pixel of destination image.
  */
-void XCFImageFormat::mergeRGBToRGB(Layer &layer, uint i, uint j, int k, int l,
+void XCFImageFormat::mergeRGBToRGB(const Layer &layer, uint i, uint j, int k, 
int l,
                                    QImage &image, int m, int n)
 {
     QRgb src = layer.image_tiles[j][i].pixel(k, l);
@@ -2256,7 +2259,7 @@
  * \param m x pixel of destination image.
  * \param n y pixel of destination image.
  */
-void XCFImageFormat::mergeGrayToGray(Layer &layer, uint i, uint j, int k, int 
l,
+void XCFImageFormat::mergeGrayToGray(const Layer &layer, uint i, uint j, int 
k, int l,
                                      QImage &image, int m, int n)
 {
     int src = layer.image_tiles[j][i].pixelIndex(k, l);
@@ -2274,7 +2277,7 @@
  * \param m x pixel of destination image.
  * \param n y pixel of destination image.
  */
-void XCFImageFormat::mergeGrayAToGray(Layer &layer, uint i, uint j, int k, int 
l,
+void XCFImageFormat::mergeGrayAToGray(const Layer &layer, uint i, uint j, int 
k, int l,
                                       QImage &image, int m, int n)
 {
     int src = qGray(layer.image_tiles[j][i].pixel(k, l));
@@ -2411,7 +2414,7 @@
  * \param m x pixel of destination image.
  * \param n y pixel of destination image.
  */
-void XCFImageFormat::mergeGrayToRGB(Layer &layer, uint i, uint j, int k, int l,
+void XCFImageFormat::mergeGrayToRGB(const Layer &layer, uint i, uint j, int k, 
int l,
                                     QImage &image, int m, int n)
 {
     QRgb src = layer.image_tiles[j][i].pixel(k, l);
@@ -2432,7 +2435,7 @@
  * \param m x pixel of destination image.
  * \param n y pixel of destination image.
  */
-void XCFImageFormat::mergeGrayAToRGB(Layer &layer, uint i, uint j, int k, int 
l,
+void XCFImageFormat::mergeGrayAToRGB(const Layer &layer, uint i, uint j, int 
k, int l,
                                      QImage &image, int m, int n)
 {
     int src = qGray(layer.image_tiles[j][i].pixel(k, l));
@@ -2586,7 +2589,7 @@
  * \param m x pixel of destination image.
  * \param n y pixel of destination image.
  */
-void XCFImageFormat::mergeIndexedToIndexed(Layer &layer, uint i, uint j, int 
k, int l,
+void XCFImageFormat::mergeIndexedToIndexed(const Layer &layer, uint i, uint j, 
int k, int l,
         QImage &image, int m, int n)
 {
     int src = layer.image_tiles[j][i].pixelIndex(k, l);
@@ -2604,7 +2607,7 @@
  * \param m x pixel of destination image.
  * \param n y pixel of destination image.
  */
-void XCFImageFormat::mergeIndexedAToIndexed(Layer &layer, uint i, uint j, int 
k, int l,
+void XCFImageFormat::mergeIndexedAToIndexed(const Layer &layer, uint i, uint 
j, int k, int l,
         QImage &image, int m, int n)
 {
     uchar src = layer.image_tiles[j][i].pixelIndex(k, l);
@@ -2636,7 +2639,7 @@
  * \param m x pixel of destination image.
  * \param n y pixel of destination image.
  */
-void XCFImageFormat::mergeIndexedAToRGB(Layer &layer, uint i, uint j, int k, 
int l,
+void XCFImageFormat::mergeIndexedAToRGB(const Layer &layer, uint i, uint j, 
int k, int l,
                                         QImage &image, int m, int n)
 {
     QRgb src = layer.image_tiles[j][i].pixel(k, l);


Reply via email to