Hello community,

here is the log from the commit of package karchive for openSUSE:Factory 
checked in at 2019-11-12 11:42:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/karchive (Old)
 and      /work/SRC/openSUSE:Factory/.karchive.new.2990 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "karchive"

Tue Nov 12 11:42:10 2019 rev:72 rq:747087 version:5.64.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/karchive/karchive.changes        2019-10-14 
13:34:15.978528963 +0200
+++ /work/SRC/openSUSE:Factory/.karchive.new.2990/karchive.changes      
2019-11-12 11:43:28.150603012 +0100
@@ -1,0 +2,15 @@
+Sun Nov  3 15:46:48 UTC 2019 - Christophe Giboudeaux <[email protected]>
+
+- Update to 5.64.0
+  * New feature release
+  * For more details please see:
+  * https://www.kde.org/announcements/kde-frameworks-5.64.0.php
+- Changes since 5.63.0:
+  * Fix memory leak in KXzFilter::init
+  * Fix null pointer reference when extraction fails
+  * decodeBCJ2: Fix assert with broken files
+  * KXzFilter::Private: remove unused props
+  * K7Zip: Fix memory use in readAndDecodePackedStreams
+  * Use ECMGenerateExportHeader to manage deprecated API better
+
+-------------------------------------------------------------------

Old:
----
  karchive-5.63.0.tar.xz
  karchive-5.63.0.tar.xz.sig

New:
----
  karchive-5.64.0.tar.xz
  karchive-5.64.0.tar.xz.sig

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

Other differences:
------------------
++++++ karchive.spec ++++++
--- /var/tmp/diff_new_pack.YREShz/_old  2019-11-12 11:43:28.758603652 +0100
+++ /var/tmp/diff_new_pack.YREShz/_new  2019-11-12 11:43:28.762603656 +0100
@@ -17,7 +17,7 @@
 
 
 %define lname   libKF5Archive5
-%define _tar_path 5.63
+%define _tar_path 5.64
 # Full KF5 version (e.g. 5.33.0)
 %{!?_kf5_version: %global _kf5_version %{version}}
 # Last major and minor KF5 version (e.g. 5.33)
@@ -25,7 +25,7 @@
 # Only needed for the package signature condition
 %bcond_without lang
 Name:           karchive
-Version:        5.63.0
+Version:        5.64.0
 Release:        0
 Summary:        Qt 5 addon providing access to numerous types of archives
 License:        LGPL-2.1-or-later


++++++ karchive-5.63.0.tar.xz -> karchive-5.64.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/karchive-5.63.0/CMakeLists.txt 
new/karchive-5.64.0/CMakeLists.txt
--- old/karchive-5.63.0/CMakeLists.txt  2019-10-06 11:33:32.000000000 +0200
+++ new/karchive-5.64.0/CMakeLists.txt  2019-11-02 13:32:48.000000000 +0100
@@ -1,10 +1,10 @@
 cmake_minimum_required(VERSION 3.5)
 
-set(KF5_VERSION "5.63.0") # handled by release scripts
+set(KF5_VERSION "5.64.0") # handled by release scripts
 project(KArchive VERSION ${KF5_VERSION})
 
 include(FeatureSummary)
-find_package(ECM 5.63.0  NO_MODULE)
+find_package(ECM 5.64.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)
 
@@ -15,8 +15,7 @@
 include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
 include(KDECMakeSettings)
 
-
-include(GenerateExportHeader)
+include(ECMGenerateExportHeader)
 
 set(REQUIRED_QT_VERSION 5.11.0)
 find_package(Qt5Core ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
@@ -52,6 +51,8 @@
 include(ECMQtDeclareLoggingCategory)
 include(ECMAddQch)
 
+set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of 
deprecated API excluded from the build [default=0].")
+
 option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt 
Assistant, Qt Creator & KDevelop)" OFF)
 add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. 
Qt Assistant, Qt Creator & KDevelop)")
 
@@ -61,6 +62,8 @@
     PACKAGE_VERSION_FILE 
"${CMAKE_CURRENT_BINARY_DIR}/KF5ArchiveConfigVersion.cmake"
     SOVERSION 5)
 add_definitions(-DQT_NO_FOREACH)
+add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050d00)
+add_definitions(-DQT_DEPRECATED_WARNINGS_SINCE=0x060000)
 
 add_subdirectory(src)
 if (BUILD_TESTING)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/karchive-5.63.0/autotests/CMakeLists.txt 
new/karchive-5.64.0/autotests/CMakeLists.txt
--- old/karchive-5.63.0/autotests/CMakeLists.txt        2019-10-06 
11:33:32.000000000 +0200
+++ new/karchive-5.64.0/autotests/CMakeLists.txt        2019-11-02 
13:32:48.000000000 +0100
@@ -17,7 +17,6 @@
     LINK_LIBRARIES KF5::Archive Qt5::Test
 )
 
-target_compile_definitions(deprecatedtest PRIVATE KARCHIVE_DEPRECATED=)
 target_link_libraries(kfiltertest ${ZLIB_LIBRARIES})
 
 ########### klimitediodevicetest ###############
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/karchive-5.63.0/autotests/deprecatedtest.cpp 
new/karchive-5.64.0/autotests/deprecatedtest.cpp
--- old/karchive-5.63.0/autotests/deprecatedtest.cpp    2019-10-06 
11:33:32.000000000 +0200
+++ new/karchive-5.64.0/autotests/deprecatedtest.cpp    2019-11-02 
13:32:48.000000000 +0100
@@ -28,7 +28,7 @@
 {
     Q_OBJECT
 
-#ifndef KARCHIVE_NO_DEPRECATED
+#if KARCHIVE_ENABLE_DEPRECATED_SINCE(5, 0)
 private Q_SLOTS:
     void testKArchiveWriteFile()
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/karchive-5.63.0/docs/Doxyfile.local 
new/karchive-5.64.0/docs/Doxyfile.local
--- old/karchive-5.63.0/docs/Doxyfile.local     1970-01-01 01:00:00.000000000 
+0100
+++ new/karchive-5.64.0/docs/Doxyfile.local     2019-11-02 13:32:48.000000000 
+0100
@@ -0,0 +1,7 @@
+### KApiDox Project-specific Overrides File
+
+# define so that deprecated API is not skipped
+PREDEFINED += \
+    "KARCHIVE_ENABLE_DEPRECATED_SINCE(x, y)=1" \
+    "KARCHIVE_BUILD_DEPRECATED_SINCE(x, y)=1" \
+    "KARCHIVE_DEPRECATED_VERSION(x, y, t)="
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/karchive-5.63.0/src/CMakeLists.txt 
new/karchive-5.64.0/src/CMakeLists.txt
--- old/karchive-5.63.0/src/CMakeLists.txt      2019-10-06 11:33:32.000000000 
+0200
+++ new/karchive-5.64.0/src/CMakeLists.txt      2019-11-02 13:32:48.000000000 
+0100
@@ -43,8 +43,15 @@
 )
 
 add_library(KF5Archive ${karchive_SRCS} ${karchive_OPTIONAL_SRCS})
-generate_export_header(KF5Archive BASE_NAME KArchive)
 add_library(KF5::Archive ALIAS KF5Archive)
+ecm_generate_export_header(KF5Archive
+    BASE_NAME KArchive
+    GROUP_BASE_NAME KF
+    VERSION ${KF5_VERSION}
+    DEPRECATED_BASE_VERSION 0
+    DEPRECATION_VERSIONS 5.0
+    EXCLUDE_DEPRECATED_BEFORE_AND_AT ${EXCLUDE_DEPRECATED_BEFORE_AND_AT}
+)
 
 target_include_directories(KF5Archive
     INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/KArchive>"
@@ -117,6 +124,7 @@
         BLANK_MACROS
             KARCHIVE_EXPORT
             KARCHIVE_DEPRECATED
+            "KARCHIVE_DEPRECATED_VERSION(x, y, t)"
         TAGFILE_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
         QCH_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
         COMPONENT Devel
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/karchive-5.63.0/src/k7zip.cpp 
new/karchive-5.64.0/src/k7zip.cpp
--- old/karchive-5.63.0/src/k7zip.cpp   2019-10-06 11:33:32.000000000 +0200
+++ new/karchive-5.64.0/src/k7zip.cpp   2019-11-02 13:32:48.000000000 +0100
@@ -1446,6 +1446,15 @@
 
         unsigned index = getIndex(prevByte, b);
         if (statusDecoder[index].decode(&rangeDecoder) == 1) {
+            if (b == 0xE8) {
+                if (callStreamPos + 4 > callStream.size()) {
+                    return QByteArray();
+                }
+            } else {
+                if (jumpStreamPos + 4 > jumpStream.size()) {
+                    return QByteArray();
+                }
+            }
             quint32 src = 0;
             for (int i = 0; i < 4; i++) {
                 unsigned char b0;
@@ -1683,6 +1692,10 @@
         inflatedDatas.clear();
 
         if (folder->unpackCRCDefined) {
+            if ((size_t)inflated.size() < unpackSize) {
+                qCDebug(KArchiveLog) << "wrong crc size data";
+                return QByteArray();
+            }
             quint32 crc = crc32(0, (Bytef *)(inflated.data()), unpackSize);
             if (crc != folder->unpackCRC) {
                 qCDebug(KArchiveLog) << "wrong crc";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/karchive-5.63.0/src/karchive.cpp 
new/karchive-5.64.0/src/karchive.cpp
--- old/karchive-5.63.0/src/karchive.cpp        2019-10-06 11:33:32.000000000 
+0200
+++ new/karchive-5.64.0/src/karchive.cpp        2019-11-02 13:32:48.000000000 
+0100
@@ -825,6 +825,10 @@
     QFile f(dest + QLatin1Char('/')  + name());
     if (f.open(QIODevice::ReadWrite | QIODevice::Truncate)) {
         QIODevice *inputDev = createDevice();
+        if (!inputDev) {
+            f.remove();
+            return false;
+        }
 
         // Read and write data in chunks to minimize memory usage
         const qint64 chunkSize = 1024 * 1024;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/karchive-5.63.0/src/karchive.h 
new/karchive-5.64.0/src/karchive.h
--- old/karchive-5.63.0/src/karchive.h  2019-10-06 11:33:32.000000000 +0200
+++ new/karchive-5.64.0/src/karchive.h  2019-11-02 13:32:48.000000000 +0100
@@ -191,14 +191,15 @@
                       mode_t perm = 0120755, const QDateTime &atime = 
QDateTime(),
                       const QDateTime &mtime = QDateTime(), const QDateTime 
&ctime = QDateTime());
 
+#if KARCHIVE_ENABLE_DEPRECATED_SINCE(5, 0)
     /**
      * @deprecated since 5.0, use writeFile(const QString&,const 
QByteArray&,mode_t,const QString&,const QString&,const QDateTime&,const 
QDateTime&,const QDateTime&)
      */
-#ifndef KARCHIVE_NO_DEPRECATED
-    KARCHIVE_DEPRECATED bool writeFile(const QString &name, const QString 
&user, const QString &group,
-                                       const char *data, qint64 size,
-                                       mode_t perm = 0100644, const QDateTime 
&atime = QDateTime(),
-                                       const QDateTime &mtime = QDateTime(), 
const QDateTime &ctime = QDateTime())
+    KARCHIVE_DEPRECATED_VERSION(5, 0, "Use KArchive::writeFile(const 
QString&,const QByteArray&,mode_t,const QString&,const QString&,const 
QDateTime&,const QDateTime&,const QDateTime&)")
+    bool writeFile(const QString &name, const QString &user, const QString 
&group,
+                   const char *data, qint64 size,
+                   mode_t perm = 0100644, const QDateTime &atime = QDateTime(),
+                   const QDateTime &mtime = QDateTime(), const QDateTime 
&ctime = QDateTime())
     {
         QByteArray array(data, size);
         return writeFile(name, array, perm, user, group, atime, mtime, ctime);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/karchive-5.63.0/src/kfilterdev.h 
new/karchive-5.64.0/src/kfilterdev.h
--- old/karchive-5.63.0/src/kfilterdev.h        2019-10-06 11:33:32.000000000 
+0200
+++ new/karchive-5.64.0/src/kfilterdev.h        2019-11-02 13:32:48.000000000 
+0100
@@ -55,8 +55,9 @@
      */
     static CompressionType compressionTypeForMimeType(const QString &mimetype);
 
+#if KARCHIVE_ENABLE_DEPRECATED_SINCE(5, 0)
     /**
-     * @deprecated Use the constructor instead (if mimetype is empty), or 
KCompressionDevice (if
+     * @deprecated Since 5.0, use the constructor instead (if mimetype is 
empty), or KCompressionDevice (if
      * the mimetype is known).
      *
      * Use:
@@ -94,8 +95,8 @@
      *         filter does not exist, the return value depends on @p 
forceFilter.
      *         The returned KCompressionDevice has to be deleted after using.
      */
-#ifndef KARCHIVE_NO_DEPRECATED
-    KARCHIVE_DEPRECATED static KCompressionDevice *deviceForFile(const QString 
&fileName,
+    KARCHIVE_DEPRECATED_VERSION(5, 0, "See API docs")
+    static KCompressionDevice *deviceForFile(const QString &fileName,
             const QString &mimetype = QString(),
             bool forceFilter = false)
     {
@@ -114,8 +115,9 @@
     }
 #endif
 
+#if KARCHIVE_ENABLE_DEPRECATED_SINCE(5, 0)
     /**
-     * @deprecated Use KCompressionDevice
+     * @deprecated Since 5.0, use KCompressionDevice
      *
      * Use:
      * KCompressionDevice::CompressionType type = 
KFilterDev::compressionTypeForMimeType(mimeType);
@@ -140,8 +142,8 @@
      * @param autoDeleteInDevice if true, @p inDevice will be deleted 
automatically
      * @return a KCompressionDevice that filters the original stream. Must be 
deleted after using
      */
-#ifndef KARCHIVE_NO_DEPRECATED
-    KARCHIVE_DEPRECATED static KCompressionDevice *device(QIODevice *inDevice, 
const QString &mimetype,
+    KARCHIVE_DEPRECATED_VERSION(5, 0, "See API docs")
+    static KCompressionDevice *device(QIODevice *inDevice, const QString 
&mimetype,
             bool autoDeleteInDevice = true)
     {
         if (inDevice == nullptr) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/karchive-5.63.0/src/kxzfilter.cpp 
new/karchive-5.64.0/src/kxzfilter.cpp
--- old/karchive-5.63.0/src/kxzfilter.cpp       2019-10-06 11:33:32.000000000 
+0200
+++ new/karchive-5.64.0/src/kxzfilter.cpp       2019-11-02 13:32:48.000000000 
+0100
@@ -45,8 +45,6 @@
     }
 
     lzma_stream zStream;
-    lzma_filter filters[5];
-    unsigned char props[5];
     int mode;
     bool isInitialized;
     KXzFilter::Flag flag;
@@ -68,6 +66,13 @@
     return init(mode, AUTO, props);
 }
 
+static void freeFilters(lzma_filter filters[])
+{
+    for (int i = 0; filters[i].id != LZMA_VLI_UNKNOWN; i++) {
+        free(filters[i].options);
+    }
+}
+
 bool KXzFilter::init(int mode, Flag flag, const QVector<unsigned char> 
&properties)
 {
     if (d->isInitialized) {
@@ -79,6 +84,10 @@
     d->zStream.next_in = nullptr;
     d->zStream.avail_in = 0;
     if (mode == QIODevice::ReadOnly) {
+        // TODO when we can depend on Qt 5.12 Use a QScopeGuard to call 
freeFilters
+        lzma_filter filters[5];
+        filters[0].id = LZMA_VLI_UNKNOWN;
+
         switch (flag) {
         case AUTO:
             /* We set the memlimit for decompression to 100MiB which should be
@@ -91,10 +100,10 @@
             }
             break;
         case LZMA: {
-            d->filters[0].id = LZMA_FILTER_LZMA1;
-            d->filters[0].options = nullptr;
-            d->filters[1].id = LZMA_VLI_UNKNOWN;
-            d->filters[1].options = nullptr;
+            filters[0].id = LZMA_FILTER_LZMA1;
+            filters[0].options = nullptr;
+            filters[1].id = LZMA_VLI_UNKNOWN;
+            filters[1].options = nullptr;
 
             Q_ASSERT(properties.size() == 5);
             unsigned char props[5];
@@ -102,46 +111,49 @@
                 props[i] = properties[i];
             }
 
-            result = lzma_properties_decode(&d->filters[0], nullptr, props, 
sizeof (props));
+            result = lzma_properties_decode(&filters[0], nullptr, props, 
sizeof (props));
             if (result != LZMA_OK) {
                 qCWarning(KArchiveLog) << "lzma_properties_decode returned" << 
result;
+                freeFilters(filters);
                 return false;
             }
             break;
         }
         case LZMA2: {
-            d->filters[0].id = LZMA_FILTER_LZMA2;
-            d->filters[0].options = nullptr;
-            d->filters[1].id = LZMA_VLI_UNKNOWN;
-            d->filters[1].options = nullptr;
+            filters[0].id = LZMA_FILTER_LZMA2;
+            filters[0].options = nullptr;
+            filters[1].id = LZMA_VLI_UNKNOWN;
+            filters[1].options = nullptr;
 
             Q_ASSERT(properties.size() == 1);
             unsigned char props[1];
             props[0] = properties[0];
 
-            result = lzma_properties_decode(&d->filters[0], nullptr, props, 
sizeof (props));
+            result = lzma_properties_decode(&filters[0], nullptr, props, 
sizeof (props));
             if (result != LZMA_OK) {
                 qCWarning(KArchiveLog) << "lzma_properties_decode returned" << 
result;
+                freeFilters(filters);
                 return false;
             }
             break;
         }
         case BCJ: {
-            d->filters[0].id = LZMA_FILTER_X86;
-            d->filters[0].options = nullptr;
+            filters[0].id = LZMA_FILTER_X86;
+            filters[0].options = nullptr;
 
             unsigned char props[5] = { 0x5d, 0x00, 0x00, 0x08, 0x00 }
             ;
-            d->filters[1].id = LZMA_FILTER_LZMA1;
-            d->filters[1].options = nullptr;
-            result = lzma_properties_decode(&d->filters[1], nullptr, props, 
sizeof (props));
+            filters[1].id = LZMA_FILTER_LZMA1;
+            filters[1].options = nullptr;
+            result = lzma_properties_decode(&filters[1], nullptr, props, 
sizeof (props));
             if (result != LZMA_OK) {
                 qCWarning(KArchiveLog) << "lzma_properties_decode1 returned" 
<< result;
+                freeFilters(filters);
                 return false;
             }
 
-            d->filters[2].id = LZMA_VLI_UNKNOWN;
-            d->filters[2].options = nullptr;
+            filters[2].id = LZMA_VLI_UNKNOWN;
+            filters[2].options = nullptr;
 
             break;
         }
@@ -155,27 +167,30 @@
         }
 
         if (flag != AUTO) {
-            result = lzma_raw_decoder(&d->zStream, d->filters);
+            result = lzma_raw_decoder(&d->zStream, filters);
             if (result != LZMA_OK) {
                 qCWarning(KArchiveLog) << "lzma_raw_decoder returned" << 
result;
+                freeFilters(filters);
                 return false;
             }
         }
+        freeFilters(filters);
 
     } else if (mode == QIODevice::WriteOnly) {
         if (flag == AUTO) {
             result = lzma_easy_encoder(&d->zStream, LZMA_PRESET_DEFAULT, 
LZMA_CHECK_CRC32);
         } else {
+            lzma_filter filters[5];
             if (flag == LZMA2) {
                 lzma_options_lzma lzma_opt;
                 lzma_lzma_preset(&lzma_opt, LZMA_PRESET_DEFAULT);
 
-                d->filters[0].id = LZMA_FILTER_LZMA2;
-                d->filters[0].options = &lzma_opt;
-                d->filters[1].id = LZMA_VLI_UNKNOWN;
-                d->filters[1].options = nullptr;
+                filters[0].id = LZMA_FILTER_LZMA2;
+                filters[0].options = &lzma_opt;
+                filters[1].id = LZMA_VLI_UNKNOWN;
+                filters[1].options = nullptr;
             }
-            result = lzma_raw_encoder(&d->zStream, d->filters);
+            result = lzma_raw_encoder(&d->zStream, filters);
         }
         if (result != LZMA_OK) {
             qCWarning(KArchiveLog) << "lzma_easy_encoder returned" << result;


Reply via email to