Hello community,

here is the log from the commit of package kcodecs for openSUSE:Factory checked 
in at 2016-04-12 19:11:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kcodecs (Old)
 and      /work/SRC/openSUSE:Factory/.kcodecs.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kcodecs"

Changes:
--------
--- /work/SRC/openSUSE:Factory/kcodecs/kcodecs.changes  2016-03-16 
10:28:26.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.kcodecs.new/kcodecs.changes     2016-04-12 
19:11:32.000000000 +0200
@@ -1,0 +2,13 @@
+Mon Apr  4 14:19:06 UTC 2016 - [email protected]
+
+- Update to 5.21.0 (boo#974793)
+  * Simplify code (qCount -> std::count,
+    homegrown isprint -> QChar::isPrint)
+  * encoding detection: fix crash in wrong usage of isprint
+    (kde#357341)
+  * Fix crash due to uninitialized variable (kde#357341)
+  * Upgrade Qt version requirement to 5.4.0
+  * For more details please see:
+    https://www.kde.org/announcements/kde-frameworks-5.21.0.php
+
+-------------------------------------------------------------------

Old:
----
  kcodecs-5.20.0.tar.xz

New:
----
  kcodecs-5.21.0.tar.xz

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

Other differences:
------------------
++++++ kcodecs.spec ++++++
--- /var/tmp/diff_new_pack.KqXM9N/_old  2016-04-12 19:11:33.000000000 +0200
+++ /var/tmp/diff_new_pack.KqXM9N/_new  2016-04-12 19:11:33.000000000 +0200
@@ -18,18 +18,18 @@
 
 %bcond_without lang
 %define lname   libKF5Codecs5
-%define _tar_path 5.20
+%define _tar_path 5.21
 Name:           kcodecs
-Version:        5.20.0
+Version:        5.21.0
 Release:        0
 BuildRequires:  cmake >= 2.8.12
 BuildRequires:  extra-cmake-modules >= %{_tar_path}
 BuildRequires:  fdupes
 BuildRequires:  kf5-filesystem
 %if %{with lang}
-BuildRequires:  cmake(Qt5LinguistTools) >= 5.3.0
+BuildRequires:  cmake(Qt5LinguistTools) >= 5.4.0
 %endif
-BuildRequires:  cmake(Qt5Core) >= 5.3.0
+BuildRequires:  cmake(Qt5Core) >= 5.4.0
 Summary:        Provides a collection of methods to manipulate strings using 
various encoding
 License:        LGPL-2.1+
 Group:          System/GUI/KDE
@@ -59,7 +59,7 @@
 Group:          Development/Libraries/KDE
 Requires:       %lname = %{version}
 Requires:       extra-cmake-modules
-Requires:       cmake(Qt5Core) >= 5.3.0
+Requires:       cmake(Qt5Core) >= 5.4.0
 
 %description devel
 KCodecs provide a collection of methods to manipulate strings using various

++++++ kcodecs-5.20.0.tar.xz -> kcodecs-5.21.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.20.0/CMakeLists.txt 
new/kcodecs-5.21.0/CMakeLists.txt
--- old/kcodecs-5.20.0/CMakeLists.txt   2016-03-05 19:48:18.000000000 +0100
+++ new/kcodecs-5.21.0/CMakeLists.txt   2016-04-03 22:45:42.000000000 +0200
@@ -3,7 +3,7 @@
 project(KCodecs)
 
 include(FeatureSummary)
-find_package(ECM 5.20.0  NO_MODULE)
+find_package(ECM 5.21.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)
 
@@ -14,7 +14,7 @@
 include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
 include(KDECMakeSettings)
 
-set(REQUIRED_QT_VERSION 5.3.0)
+set(REQUIRED_QT_VERSION 5.4.0)
 find_package(Qt5Core ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
 
 
@@ -25,7 +25,7 @@
 
 include(ECMPoQmTools)
 
-set(KF5_VERSION "5.20.0") # handled by release scripts
+set(KF5_VERSION "5.21.0") # handled by release scripts
 
 ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX KCODECS
                         VERSION_HEADER 
"${CMAKE_CURRENT_BINARY_DIR}/kcodecs_version.h"
Files old/kcodecs-5.20.0/autotests/data/binary_data and 
new/kcodecs-5.21.0/autotests/data/binary_data differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.20.0/autotests/kencodingprobertest.cpp 
new/kcodecs-5.21.0/autotests/kencodingprobertest.cpp
--- old/kcodecs-5.20.0/autotests/kencodingprobertest.cpp        2016-03-05 
19:48:18.000000000 +0100
+++ new/kcodecs-5.21.0/autotests/kencodingprobertest.cpp        2016-04-03 
22:45:42.000000000 +0200
@@ -17,6 +17,7 @@
 
 #include "kencodingprobertest.h"
 
+#include <QDir>
 #include <QTest>
 #include <kencodingprober.h>
 
@@ -71,6 +72,17 @@
     ep->feed(QByteArray::fromHex("aefcafc7a6caa474a141a6b3ae65a444a46a"));
     QCOMPARE(ep->encoding().toLower(), QByteArray("big5"));
     ep->reset();
+
+    // binary data, just make sure we do not crash (cf. crash in bug #357341)
+    const QDir dataDir(QFINDTESTDATA("data"));
+    const QString binaryFile = dataDir.filePath(QStringLiteral("binary_data"));
+    QFile file(binaryFile);
+    QVERIFY(file.open(QIODevice::ReadOnly));
+    QByteArray binaryData(file.readAll());
+    ep->setProberType(KEncodingProber::Universal);
+    ep->feed(binaryData);
+    QCOMPARE(ep->encoding().toLower(), QByteArray("utf-8"));
+    ep->reset();
 }
 
 QTEST_MAIN(KEncodingProberTest)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.20.0/src/probers/UnicodeGroupProber.cpp 
new/kcodecs-5.21.0/src/probers/UnicodeGroupProber.cpp
--- old/kcodecs-5.20.0/src/probers/UnicodeGroupProber.cpp       2016-03-05 
19:48:18.000000000 +0100
+++ new/kcodecs-5.21.0/src/probers/UnicodeGroupProber.cpp       2016-04-03 
22:45:42.000000000 +0200
@@ -24,9 +24,7 @@
 
 #include "UnicodeGroupProber.h"
 
-#include "ctype_test_p.h"
-
-#include <QtAlgorithms>
+#include <QChar>
 #include <math.h>
 
 namespace kencodingprober
@@ -61,8 +59,6 @@
 nsProbingState UnicodeGroupProber::HandleData(const char *aBuf, unsigned int 
aLen)
 {
     nsSMState codingState;
-    int j;
-    uint i, weight_BOM, counts[5];
     static bool disableUTF16LE = false;
     static bool disableUTF16BE = false;
     double weight_zero;
@@ -77,16 +73,17 @@
             disableUTF16LE = true;
             disableUTF16BE = true;
         }
-        weight_BOM = (uint)(sqrt((double)aLen) + aLen / 10.0);
+        const uint weight_BOM = sqrt((double)aLen) + aLen / 10.0;
+        uint counts[5] = {0, 0, 0, 0, 0};
         for (uint i = 0; i < 5; i++) {
-            qCount(aBuf, aBuf + aLen, char(i), counts[i]);
+            counts[i] = std::count(aBuf, aBuf + aLen, char(i));
         }
         weight_zero = (2.0 * (counts[0] + counts[1] + counts[2] + counts[3] + 
counts[4]) + weight_BOM) / aLen;
         if (weight_zero < log(1.4142)) {
             disableUTF16LE = true;
             disableUTF16BE = true;
         }
-        if (4 >= aBuf[1] && aBuf[1] >= 0 && isprint(aBuf[0])) {
+        if (4 >= aBuf[1] && aBuf[1] >= 0 && 
QChar::isPrint(static_cast<uint>(aBuf[0]))) {
             disableUTF16BE = true;
         } else {
             disableUTF16LE = true;
@@ -103,8 +100,8 @@
         }
     }
 
-    for (i = 0; i < aLen; ++i) {
-        for (j = mActiveSM - 1; j >= 0; --j) {
+    for (uint i = 0; i < aLen; ++i) {
+        for (int j = mActiveSM - 1; j >= 0; --j) {
             //byte is feed to all active state machine
             codingState = mCodingSM[j]->NextState(aBuf[i]);
             if (codingState == eError) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kcodecs-5.20.0/src/probers/ctype_test_p.h 
new/kcodecs-5.21.0/src/probers/ctype_test_p.h
--- old/kcodecs-5.20.0/src/probers/ctype_test_p.h       2016-03-05 
19:48:18.000000000 +0100
+++ new/kcodecs-5.21.0/src/probers/ctype_test_p.h       1970-01-01 
01:00:00.000000000 +0100
@@ -1,97 +0,0 @@
-/*  -*- C++ -*-
-*  Copyright (C) 2008 <[email protected]>
-*
-*
-*  Permission is hereby granted, free of charge, to any person obtaining
-*  a copy of this software and associated documentation files (the
-*  "Software"), to deal in the Software without restriction, including
-*  without limitation the rights to use, copy, modify, merge, publish,
-*  distribute, sublicense, and/or sell copies of the Software, and to
-*  permit persons to whom the Software is furnished to do so, subject to
-*  the following conditions:
-*
-*  The above copyright notice and this permission notice shall be included
-*  in all copies or substantial portions of the Software.
-*
-*  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-*  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-*  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-*  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-*  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-*  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-*  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-#ifndef CTYPE_TEST_P_H
-#define CTYPE_TEST_P_H
-
-enum {
-    CTYPE_ALNUM  = 1 << 0,
-    CTYPE_ALPHA  = 1 << 1,
-    CTYPE_CNTRL  = 1 << 2,
-    CTYPE_DIGIT  = 1 << 3,
-    CTYPE_GRAPH  = 1 << 4,
-    CTYPE_LOWER  = 1 << 5,
-    CTYPE_PRINT  = 1 << 6,
-    CTYPE_PUNCT  = 1 << 7,
-    CTYPE_SPACE  = 1 << 8,
-    CTYPE_UPPER  = 1 << 9,
-    CTYPE_XDIGIT = 1 << 10,
-    CTYPE_NAME   = 1 << 11,
-    CTYPE_BINARY = 1 << 12,
-    CTYPE_TEXT   = 1 << 13
-};
-
-static const short int ctype_data[0x100] = {
-    0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, /* 0x00 */
-    0x1004, 0x0104, 0x0104, 0x1004, 0x0104, 0x0104, 0x1004, 0x1004, /* 0x08 */
-    0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, /* 0x10 */
-    0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, /* 0x18 */
-    0x0140, 0x00d0, 0x00d0, 0x00d0, 0x00d0, 0x00d0, 0x00d0, 0x00d0, /* 0x20 */
-    0x00d0, 0x00d0, 0x00d0, 0x00d0, 0x00d0, 0x08d0, 0x08d0, 0x08d0, /* 0x28 */
-    0x0c59, 0x0c59, 0x0c59, 0x0c59, 0x0c59, 0x0c59, 0x0c59, 0x0c59, /* 0x30 */
-    0x0c59, 0x0c59, 0x08d0, 0x00d0, 0x00d0, 0x00d0, 0x00d0, 0x00d0, /* 0x38 */
-    0x00d0, 0x2e53, 0x2e53, 0x2e53, 0x2e53, 0x2e53, 0x2e53, 0x2a53, /* 0x40 */
-    0x2a53, 0x2a53, 0x2a53, 0x2a53, 0x2a53, 0x2a53, 0x2a53, 0x2a53, /* 0x48 */
-    0x2a53, 0x2a53, 0x2a53, 0x2a53, 0x2a53, 0x2a53, 0x2a53, 0x2a53, /* 0x50 */
-    0x2a53, 0x2a53, 0x2a53, 0x00d0, 0x00d0, 0x00d0, 0x00d0, 0x08d0, /* 0x58 */
-    0x00d0, 0x2c73, 0x2c73, 0x2c73, 0x2c73, 0x2c73, 0x2c73, 0x2873, /* 0x60 */
-    0x2873, 0x2873, 0x2873, 0x2873, 0x2873, 0x2873, 0x2873, 0x2873, /* 0x68 */
-    0x2873, 0x2873, 0x2873, 0x2873, 0x2873, 0x2873, 0x2873, 0x2873, /* 0x70 */
-    0x2873, 0x2873, 0x2873, 0x00d0, 0x00d0, 0x00d0, 0x00d0, 0x1004, /* 0x78 */
-    0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0x80 */
-    0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0x88 */
-    0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0x90 */
-    0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0x98 */
-    0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0xa0 */
-    0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0xa8 */
-    0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0xb0 */
-    0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0xb8 */
-    0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0xc0 */
-    0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0xc8 */
-    0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0xd0 */
-    0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0xd8 */
-    0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0xe0 */
-    0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0xe8 */
-    0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0xf0 */
-    0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, /* 0xf8 */
-};
-
-#define ctype_test(c, t) ((ctype_data[(unsigned short)c] & t) != 0)
-
-#define isalnum(c)  ctype_test((c), CTYPE_ALNUM)
-#define isalpha(c)  ctype_test((c), CTYPE_ALPHA)
-#define iscntrl(c)  ctype_test((c), CTYPE_CNTRL)
-#define isdigit(c)  ctype_test((c), CTYPE_DIGIT)
-#define isgraph(c)  ctype_test((c), CTYPE_GRAPH)
-#define islower(c)  ctype_test((c), CTYPE_LOWER)
-#define isprint(c)  ctype_test((c), CTYPE_PRINT)
-#define ispunct(c)  ctype_test((c), CTYPE_PUNCT)
-#define isspace(c)  ctype_test((c), CTYPE_SPACE)
-#define isupper(c)  ctype_test((c), CTYPE_UPPER)
-#define isxdigit(c) ctype_test((c), CTYPE_XDIGIT)
-#define isname(c)   ctype_test((c), CTYPE_NAME)
-#define isbinary(c) ctype_test((c), CTYPE_BINARY)
-#define istext(c)   ctype_test((c), CTYPE_TEXT)
-
-#endif


Reply via email to