Skip to content

Commit

Permalink
tools/MINGW-packages: update
Browse files Browse the repository at this point in the history
fix hooks in glib2 and add two patches for qt4
  • Loading branch information
rodlie committed Oct 24, 2021
1 parent e5f051e commit 2a8e5aa
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 12 deletions.
6 changes: 3 additions & 3 deletions tools/MINGW-packages/mingw-w64-glib2/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ _realname=glib2
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=2.68.4
pkgrel=2
pkgrel=3
url="https://www.gtk.org/"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
Expand Down Expand Up @@ -38,8 +38,8 @@ sha256sums=('62fd061d08a75492617e625a73e2c05e259f831acbb8e1f8b9c81f23f7993a3b'
'51d02360a1ee978fd45e77b84bca9cfbcf080d91986b5c0efe0732779c6a54ec'
'5b238550c8826b0c0695b16b2689ae2c2144e8f488137b7e867b6c651f125a10'
'0f44135a139e3951c4b5fa7d4628d75226e0666d891faf524777e1d1ec3b440b'
'0c3d54636407e0e13429b73959cace626253cd772e1d4870de0fb92b0b99545a'
'f18d27d98709dba8c5f9756672baaf0158fb4353c9edbdc2e80021f88ff34ced'
'ae0514635c848f1628c12f855bc8cb47e5cfae5423744ff7ccc90d57ce12bbba'
'c28f65b393fd965fb2e0eed81903f4ffc24b77500580bb89661195174011dd76'
'396c25cfd740ffbb72209133c7b9453173167577265a4bb14502678de8d5a8f9'
'60a8831451976572595b9628260cd2c3210064bc51d196eaf7c4daded4d1f74d'
'205760eaf4062c2d992e4b5477c6a898e8802cd8841159a0cf639d05704b3c66'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Trigger]
Type = Path
Type = File
Operation = Install
Operation = Upgrade
Operation = Remove
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Trigger]
Type = Path
Type = File
Operation = Install
Operation = Upgrade
Operation = Remove
Expand Down
20 changes: 13 additions & 7 deletions tools/MINGW-packages/mingw-w64-qt4/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ else
fi

pkgver=4.8.7
pkgrel=11
pkgrel=12
arch=('any')
url='https://www.qt.io/'
install=qt4-${CARCH}.install
Expand Down Expand Up @@ -102,7 +102,9 @@ source=("https://download.qt.io/archive/qt/${pkgver%.*}/${pkgver}/${_pkgfqn}.tar
relwithdeb.diff
qt4-pcre.patch
0001-Enable-building-with-C-11-and-C-14.patch
qt4-selection-flags-static_cast.patch)
qt4-selection-flags-static_cast.patch
qt-CVE-2020-17507.patch
qt-everywhere-opensource-src-4.8.7-clamp-parsed-doubles-to-float-representtable-values.patch)
sha256sums=('e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0'
'e7c8fccf933dfee061b2960b5754e4835e7cb87c0e36166d3b11d69632732215'
'5e6a61ced784d7d24c65d81e769b67b8f6066a33581c8b17cdf374a4c723cd23'
Expand All @@ -129,11 +131,13 @@ sha256sums=('e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0'
'51da49e41edac66559d3ec8dd0a152995a51a53e5d1f63f09fa089a8af7e3112'
'61d6bf45649c728dec5f8d22be5b496ed9d40f52c2c70102696d07133cd1750d'
'e19a32b9dc050b3a605a6a5cb40fc3da8d8167ef240c105bb0737cc8bebadceb'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP')
'42c555937269b36c1a34d2a183ea98cf8ab1aac9f4af447ece635a49e738524e'
'453cb5bd4a0fc1183636db9a22360f2d6fa58b43f0b5ed02a80c2d1e0a894be0'
'92ce0bf38d902acc2f0123f300568f8490849d8602b4919b5ffe55592e1146bb'
'7a25e1f42e7a689a4bb3d71f412d03e1c3c45676767ce5c3a2dce9835a9e4fae'
'3c35b393b3c4397d4e69e949cd5a77df590938c0f95731c771bf6be6565deaba'
'e5f8db55f33352034e55a98ff035192b7ccb87a5f54ae44ccbb2982fd43afa90'
'b59135832f6e72dc38e26fc742f5160aa5246b31cddf26948da7237784c5d9bb')

prepare() {
cd ${srcdir}/${_pkgfqn}
Expand Down Expand Up @@ -166,6 +170,8 @@ prepare() {
patch -p0 -i ${srcdir}/qt4-pcre.patch
patch -p1 -i ${srcdir}/0001-Enable-building-with-C-11-and-C-14.patch
patch -p1 -i ${srcdir}/qt4-selection-flags-static_cast.patch
patch -p1 -i ${srcdir}/qt-CVE-2020-17507.patch
patch -p1 -i ${srcdir}/qt-everywhere-opensource-src-4.8.7-clamp-parsed-doubles-to-float-representtable-values.patch

if check_option "debug" "y"; then
patch -p1 -i ${srcdir}/0100-qt4-build-debug-qmake.patch
Expand Down
14 changes: 14 additions & 0 deletions tools/MINGW-packages/mingw-w64-qt4/qt-CVE-2020-17507.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff -up qt-everywhere-opensource-src-4.8.7/src/gui/image/qxbmhandler.cpp.me qt-everywhere-opensource-src-4.8.7/src/gui/image/qxbmhandler.cpp
--- qt-everywhere-opensource-src-4.8.7/src/gui/image/qxbmhandler.cpp.me 2020-08-13 11:20:45.943402169 +0200
+++ qt-everywhere-opensource-src-4.8.7/src/gui/image/qxbmhandler.cpp 2020-08-13 11:21:26.025976881 +0200
@@ -154,7 +154,9 @@ static bool read_xbm_body(QIODevice *dev
w = (w+7)/8; // byte width

while (y < h) { // for all encoded bytes...
- if (p) { // p = "0x.."
+ if (p && p < (buf + readBytes - 3)) { // p = "0x.."
+ if (!isxdigit(p[2]) || !isxdigit(p[3]))
+ return false;
*b++ = hex2byte(p+2);
p += 2;
if (++x == w && ++y < h) {
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
diff -up qt-everywhere-opensource-src-4.8.7/src/svg/qsvghandler.cpp.me qt-everywhere-opensource-src-4.8.7/src/svg/qsvghandler.cpp
--- qt-everywhere-opensource-src-4.8.7/src/svg/qsvghandler.cpp.me 2021-03-09 14:23:00.636840796 +0100
+++ qt-everywhere-opensource-src-4.8.7/src/svg/qsvghandler.cpp 2021-03-09 21:34:46.240482104 +0100
@@ -68,6 +68,7 @@
#include "private/qmath_p.h"

#include "float.h"
+#include <cmath>

QT_BEGIN_NAMESPACE

@@ -630,15 +631,10 @@ static qreal toDouble(const QChar *&str)
if (neg)
val = -val;
} else {
-#if defined(Q_WS_QWS) && !defined(Q_OS_VXWORKS)
- if(sizeof(qreal) == sizeof(float))
- val = strtof(temp, 0);
- else
-#endif
- {
- bool ok = false;
- val = qstrtod(temp, 0, &ok);
- }
+ val = QByteArray::fromRawData(temp, pos).toDouble();
+ // Do not tolerate values too wild to be represented normally by floats
+ if (std::fpclassify(float(val)) != FP_NORMAL)
+ val = 0;
}
return val;

@@ -2945,6 +2941,8 @@ static QSvgStyleProperty *createRadialGr
ncy = toDouble(cy);
if (!r.isEmpty())
nr = toDouble(r);
+ if (nr < 0.5)
+ nr = 0.5;

qreal nfx = ncx;
if (!fx.isEmpty())

0 comments on commit 2a8e5aa

Please sign in to comment.