1:4.8.6-13

- move qmlviewer to -devel
- pull in some upstream fixes
This commit is contained in:
Rex Dieter 2014-09-16 08:39:45 -05:00
parent 9969c7af3a
commit b83b6ab902
10 changed files with 755 additions and 52 deletions

View File

@ -0,0 +1,43 @@
From f1b76c126c476c155af8c404b97c42cd1a709333 Mon Sep 17 00:00:00 2001
From: Lars Knoll <lars.knoll@digia.com>
Date: Thu, 24 Apr 2014 15:33:27 +0200
Subject: [PATCH 23/74] Don't crash on broken GIF images
Broken GIF images could set invalid width and height
values inside the image, leading to Qt creating a null
QImage for it. In that case we need to abort decoding
the image and return an error.
Initial patch by Rich Moore.
Backport of Id82a4036f478bd6e49c402d6598f57e7e5bb5e1e from Qt 5
Task-number: QTBUG-38367
Change-Id: I0680740018aaa8356d267b7af3f01fac3697312a
Security-advisory: CVE-2014-0190
Reviewed-by: Richard J. Moore <rich@kde.org>
---
src/gui/image/qgifhandler.cpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/gui/image/qgifhandler.cpp b/src/gui/image/qgifhandler.cpp
index 3324f04..5199dd3 100644
--- a/src/gui/image/qgifhandler.cpp
+++ b/src/gui/image/qgifhandler.cpp
@@ -359,6 +359,13 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length,
memset(bits, 0, image->byteCount());
}
+ // Check if the previous attempt to create the image failed. If it
+ // did then the image is broken and we should give up.
+ if (image->isNull()) {
+ state = Error;
+ return -1;
+ }
+
disposePrevious(image);
disposed = false;
--
1.9.3

View File

@ -0,0 +1,379 @@
From 45693cc638d10890f2816a38d38de6ddaf04ffd3 Mon Sep 17 00:00:00 2001
From: Simon Yuan <simon.yuan@navico.com>
Date: Wed, 2 Apr 2014 16:02:04 +1300
Subject: [PATCH 30/74] Memory and file descriptor leak in QFontCache
Make the cache also use the ref counts
Make everyone who decrements a ref count check for 0 and delete
Move all cache logic to the cache
Same idea as 36cb3f3 and b3dae68 in Qt 5 without the extra stuff
Task-number: QTBUG-38035
Change-Id: I27bea376f4ec0888463b4ec3ed1a6bef00d041f8
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
---
src/gui/text/qfont.cpp | 102 +++++++++++++++++-------------------------
src/gui/text/qfontengine.cpp | 7 +--
src/gui/text/qrawfont.cpp | 13 +++---
src/gui/text/qrawfont_win.cpp | 4 +-
src/gui/text/qstatictext.cpp | 6 +--
src/gui/text/qtextengine.cpp | 7 +--
6 files changed, 55 insertions(+), 84 deletions(-)
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index 7e94c1e..fa9bb70 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -275,8 +275,8 @@ QFontPrivate::QFontPrivate(const QFontPrivate &other)
QFontPrivate::~QFontPrivate()
{
- if (engineData)
- engineData->ref.deref();
+ if (engineData && !engineData->ref.deref())
+ delete engineData;
engineData = 0;
if (scFont && scFont != this)
scFont->ref.deref();
@@ -298,7 +298,8 @@ QFontEngine *QFontPrivate::engineForScript(int script) const
script = QUnicodeTables::Common;
if (engineData && engineData->fontCache != QFontCache::instance()) {
// throw out engineData that came from a different thread
- engineData->ref.deref();
+ if (!engineData->ref.deref())
+ delete engineData;
engineData = 0;
}
if (!engineData || !QT_FONT_ENGINE_FROM_DATA(engineData, script))
@@ -417,13 +418,13 @@ QFontEngineData::~QFontEngineData()
{
#if !defined(Q_WS_MAC)
for (int i = 0; i < QUnicodeTables::ScriptCount; ++i) {
- if (engines[i])
- engines[i]->ref.deref();
+ if (engines[i] && !engines[i]->ref.deref())
+ delete engines[i];
engines[i] = 0;
}
#else
- if (engine)
- engine->ref.deref();
+ if (engine && !engine->ref.deref())
+ delete engine;
engine = 0;
#endif // Q_WS_X11 || Q_WS_WIN || Q_WS_MAC
}
@@ -770,8 +771,8 @@ QFont::QFont(QFontPrivate *data)
void QFont::detach()
{
if (d->ref == 1) {
- if (d->engineData)
- d->engineData->ref.deref();
+ if (d->engineData && !d->engineData->ref.deref())
+ delete d->engineData;
d->engineData = 0;
if (d->scFont && d->scFont != d.data())
d->scFont->ref.deref();
@@ -2819,7 +2820,7 @@ QFontCache::~QFontCache()
EngineDataCache::ConstIterator it = engineDataCache.constBegin(),
end = engineDataCache.constEnd();
while (it != end) {
- if (it.value()->ref == 0)
+ if (it.value()->ref.deref() == 0)
delete it.value();
else
FC_DEBUG("QFontCache::~QFontCache: engineData %p still has refcount %d",
@@ -2827,24 +2828,6 @@ QFontCache::~QFontCache()
++it;
}
}
- EngineCache::ConstIterator it = engineCache.constBegin(),
- end = engineCache.constEnd();
- while (it != end) {
- if (--it.value().data->cache_count == 0) {
- if (it.value().data->ref == 0) {
- FC_DEBUG("QFontCache::~QFontCache: deleting engine %p key=(%d / %g %g %d %d %d)",
- it.value().data, it.key().script, it.key().def.pointSize,
- it.key().def.pixelSize, it.key().def.weight, it.key().def.style,
- it.key().def.fixedPitch);
-
- delete it.value().data;
- } else {
- FC_DEBUG("QFontCache::~QFontCache: engine = %p still has refcount %d",
- it.value().data, int(it.value().data->ref));
- }
- }
- ++it;
- }
}
void QFontCache::clear()
@@ -2856,16 +2839,14 @@ void QFontCache::clear()
QFontEngineData *data = it.value();
#if !defined(Q_WS_MAC)
for (int i = 0; i < QUnicodeTables::ScriptCount; ++i) {
- if (data->engines[i]) {
- data->engines[i]->ref.deref();
- data->engines[i] = 0;
- }
+ if (data->engines[i] && !data->engines[i]->ref.deref())
+ delete data->engines[i];
+ data->engines[i] = 0;
}
#else
- if (data->engine) {
- data->engine->ref.deref();
- data->engine = 0;
- }
+ if (data->engine && !data->engine->ref.deref())
+ delete data->engine;
+ data->engine = 0;
#endif
++it;
}
@@ -2873,15 +2854,7 @@ void QFontCache::clear()
for (EngineCache::Iterator it = engineCache.begin(), end = engineCache.end();
it != end; ++it) {
- if (it->data->ref == 0) {
- delete it->data;
- it->data = 0;
- }
- }
-
- for (EngineCache::Iterator it = engineCache.begin(), end = engineCache.end();
- it != end; ++it) {
- if (it->data && it->data->ref == 0) {
+ if (it->data->ref.deref() == 0) {
delete it->data;
it->data = 0;
}
@@ -2916,6 +2889,8 @@ void QFontCache::insertEngineData(const Key &key, QFontEngineData *engineData)
{
FC_DEBUG("QFontCache: inserting new engine data %p", engineData);
+ Q_ASSERT(!engineDataCache.contains(key));
+ engineData->ref.ref(); // the cache has a reference
engineDataCache.insert(key, engineData);
increaseCost(sizeof(QFontEngineData));
}
@@ -2946,6 +2921,11 @@ void QFontCache::insertEngine(const Key &key, QFontEngine *engine)
Engine data(engine);
data.timestamp = ++current_timestamp;
+ QFontEngine *oldEngine = engineCache.value(key).data;
+ engine->ref.ref(); // the cache has a reference
+ if (oldEngine && !oldEngine->ref.deref())
+ delete oldEngine;
+
engineCache.insert(key, data);
// only increase the cost if this is the first time we insert the engine
@@ -3005,12 +2985,11 @@ void QFontCache::cleanupPrinterFonts()
continue;
}
- if(it.value()->ref != 0) {
- for(int i = 0; i < QUnicodeTables::ScriptCount; ++i) {
- if(it.value()->engines[i]) {
- it.value()->engines[i]->ref.deref();
- it.value()->engines[i] = 0;
- }
+ if (it.value()->ref > 1) {
+ for (int i = 0; i < QUnicodeTables::ScriptCount; ++i) {
+ if (it.value()->engines[i] && !it.value()->engines[i]->ref.deref())
+ delete it.value()->engines[i];
+ it.value()->engines[i] = 0;
}
++it;
} else {
@@ -3021,7 +3000,8 @@ void QFontCache::cleanupPrinterFonts()
FC_DEBUG(" %p", rem.value());
- delete rem.value();
+ if (!rem.value()->ref.deref())
+ delete rem.value();
engineDataCache.erase(rem);
}
}
@@ -3030,7 +3010,7 @@ void QFontCache::cleanupPrinterFonts()
EngineCache::Iterator it = engineCache.begin(),
end = engineCache.end();
while(it != end) {
- if (it.value().data->ref != 0 || it.key().screen == 0) {
+ if (it.value().data->ref != 1 || it.key().screen == 0) {
++it;
continue;
}
@@ -3044,7 +3024,8 @@ void QFontCache::cleanupPrinterFonts()
FC_DEBUG(" DELETE: last occurrence in cache");
decreaseCost(it.value().data->cache_cost);
- delete it.value().data;
+ if (!it.value().data->ref.deref())
+ delete it.value().data;
}
engineCache.erase(it++);
@@ -3093,7 +3074,7 @@ void QFontCache::timerEvent(QTimerEvent *)
# endif // Q_WS_X11 || Q_WS_WIN
#endif // QFONTCACHE_DEBUG
- if (it.value()->ref != 0)
+ if (it.value()->ref > 1)
in_use_cost += engine_data_cost;
}
}
@@ -3109,7 +3090,7 @@ void QFontCache::timerEvent(QTimerEvent *)
int(it.value().data->ref), it.value().data->cache_count,
it.value().data->cache_cost);
- if (it.value().data->ref != 0)
+ if (it.value().data->ref > 1)
in_use_cost += it.value().data->cache_cost / it.value().data->cache_count;
}
@@ -3159,7 +3140,7 @@ void QFontCache::timerEvent(QTimerEvent *)
EngineDataCache::Iterator it = engineDataCache.begin(),
end = engineDataCache.end();
while (it != end) {
- if (it.value()->ref != 0) {
+ if (it.value()->ref > 1) {
++it;
continue;
}
@@ -3187,7 +3168,7 @@ void QFontCache::timerEvent(QTimerEvent *)
uint least_popular = ~0u;
for (; it != end; ++it) {
- if (it.value().data->ref != 0)
+ if (it.value().data->ref > 1)
continue;
if (it.value().timestamp < oldest &&
@@ -3200,7 +3181,7 @@ void QFontCache::timerEvent(QTimerEvent *)
FC_DEBUG(" oldest %u least popular %u", oldest, least_popular);
for (it = engineCache.begin(); it != end; ++it) {
- if (it.value().data->ref == 0 &&
+ if (it.value().data->ref == 1 &&
it.value().timestamp == oldest &&
it.value().hits == least_popular)
break;
@@ -3216,7 +3197,8 @@ void QFontCache::timerEvent(QTimerEvent *)
FC_DEBUG(" DELETE: last occurrence in cache");
decreaseCost(it.value().data->cache_cost);
- delete it.value().data;
+ if (!it.value().data->ref.deref())
+ delete it.value().data;
} else {
/*
this particular font engine is in the cache multiple
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 9de475c..bf108c4 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -1325,11 +1325,8 @@ QFontEngineMulti::~QFontEngineMulti()
{
for (int i = 0; i < engines.size(); ++i) {
QFontEngine *fontEngine = engines.at(i);
- if (fontEngine) {
- fontEngine->ref.deref();
- if (fontEngine->cache_count == 0 && fontEngine->ref == 0)
- delete fontEngine;
- }
+ if (fontEngine && !fontEngine->ref.deref())
+ delete fontEngine;
}
}
diff --git a/src/gui/text/qrawfont.cpp b/src/gui/text/qrawfont.cpp
index 2b7554a..cb2bcb3 100644
--- a/src/gui/text/qrawfont.cpp
+++ b/src/gui/text/qrawfont.cpp
@@ -682,8 +682,7 @@ void QRawFont::setPixelSize(qreal pixelSize)
if (d->fontEngine != 0)
d->fontEngine->ref.ref();
- oldFontEngine->ref.deref();
- if (oldFontEngine->cache_count == 0 && oldFontEngine->ref == 0)
+ if (!oldFontEngine->ref.deref())
delete oldFontEngine;
}
@@ -693,12 +692,10 @@ void QRawFont::setPixelSize(qreal pixelSize)
void QRawFontPrivate::cleanUp()
{
platformCleanUp();
- if (fontEngine != 0) {
- fontEngine->ref.deref();
- if (fontEngine->cache_count == 0 && fontEngine->ref == 0)
- delete fontEngine;
- fontEngine = 0;
- }
+ if (fontEngine != 0 && !fontEngine->ref.deref())
+ delete fontEngine;
+ fontEngine = 0;
+
hintingPreference = QFont::PreferDefaultHinting;
}
diff --git a/src/gui/text/qrawfont_win.cpp b/src/gui/text/qrawfont_win.cpp
index 6923aae..9b66886 100644
--- a/src/gui/text/qrawfont_win.cpp
+++ b/src/gui/text/qrawfont_win.cpp
@@ -600,11 +600,11 @@ void QRawFontPrivate::platformLoadFromData(const QByteArray &fontData,
if (request.family != fontEngine->fontDef.family) {
qWarning("QRawFont::platformLoadFromData: Failed to load font. "
"Got fallback instead: %s", qPrintable(fontEngine->fontDef.family));
- if (fontEngine->cache_count == 0 && fontEngine->ref == 0)
+ if (fontEngine->ref == 0)
delete fontEngine;
fontEngine = 0;
} else {
- Q_ASSERT(fontEngine->cache_count == 0 && fontEngine->ref == 0);
+ Q_ASSERT(fontEngine->ref == 0);
// Override the generated font name
static_cast<QFontEngineWin *>(fontEngine)->uniqueFamilyName = uniqueFamilyName;
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp
index 657da33..b111200 100644
--- a/src/gui/text/qstatictext.cpp
+++ b/src/gui/text/qstatictext.cpp
@@ -724,10 +724,8 @@ QStaticTextItem::~QStaticTextItem()
void QStaticTextItem::setFontEngine(QFontEngine *fe)
{
- if (m_fontEngine != 0) {
- if (!m_fontEngine->ref.deref())
- delete m_fontEngine;
- }
+ if (m_fontEngine != 0 && !m_fontEngine->ref.deref())
+ delete m_fontEngine;
m_fontEngine = fe;
if (m_fontEngine != 0)
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index b371237..f4b86b0 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -1453,11 +1453,8 @@ void QTextEngine::shape(int item) const
static inline void releaseCachedFontEngine(QFontEngine *fontEngine)
{
- if (fontEngine) {
- fontEngine->ref.deref();
- if (fontEngine->cache_count == 0 && fontEngine->ref == 0)
- delete fontEngine;
- }
+ if (fontEngine && !fontEngine->ref.deref())
+ delete fontEngine;
}
void QTextEngine::resetFontEngineCache()
--
1.9.3

View File

@ -0,0 +1,137 @@
From 59eb561989f7a7b65c3e9b11d0ac062479013bf2 Mon Sep 17 00:00:00 2001
From: Peter Hartmann <phartmann@blackberry.com>
Date: Wed, 9 Jul 2014 16:22:44 +0200
Subject: [PATCH 47/74] QSslCertificate: blacklist NIC certificates from India
Those intermediate certificates were used to issue "unauthorized"
certificates according to
http://googleonlinesecurity.blogspot.de/2014/07/maintaining-digital-certificate-security.html
, and are by default trusted on Windows, so to be safe we blacklist
them here.
(backport of commit 916c9d469bd0df227dc3be97fcca27e3cf58144f)
Change-Id: I22c6637895dcd21b1f7af73fdd5ca39d4747cf9e
Reviewed-by: Richard J. Moore <rich@kde.org>
---
src/network/ssl/qsslcertificate.cpp | 4 ++++
.../blacklisted-nic-india-2007.pem | 25 +++++++++++++++++++++
.../blacklisted-nic-india-2011.pem | 26 ++++++++++++++++++++++
.../blacklisted-nic-india-2014.pem | 26 ++++++++++++++++++++++
4 files changed, 81 insertions(+)
create mode 100644 tests/auto/qsslcertificate/more-certificates/blacklisted-nic-india-2007.pem
create mode 100644 tests/auto/qsslcertificate/more-certificates/blacklisted-nic-india-2011.pem
create mode 100644 tests/auto/qsslcertificate/more-certificates/blacklisted-nic-india-2014.pem
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp
index 254f45b..a015880 100644
--- a/src/network/ssl/qsslcertificate.cpp
+++ b/src/network/ssl/qsslcertificate.cpp
@@ -832,6 +832,10 @@ static const char *certificate_blacklist[] = {
"2148", "e-islem.kktcmerkezbankasi.org", // Turktrust mis-issued intermediate certificate
"204199", "AC DG Tr\xC3\xA9sor SSL", // intermediate certificate linking back to ANSSI French National Security Agency
+
+ "10115", "NIC Certifying Authority", // intermediate certificate from NIC India (2007)
+ "10130", "NIC CA 2011", // intermediate certificate from NIC India (2011)
+ "10161", "NIC CA 2014", // intermediate certificate from NIC India (2014)
0
};
diff --git a/tests/auto/qsslcertificate/more-certificates/blacklisted-nic-india-2007.pem b/tests/auto/qsslcertificate/more-certificates/blacklisted-nic-india-2007.pem
new file mode 100644
index 0000000..2106f66
--- /dev/null
+++ b/tests/auto/qsslcertificate/more-certificates/blacklisted-nic-india-2007.pem
@@ -0,0 +1,25 @@
+-----BEGIN CERTIFICATE-----
+MIIENjCCAx6gAwIBAgICJ4MwDQYJKoZIhvcNAQEFBQAwOjELMAkGA1UEBhMCSU4x
+EjAQBgNVBAoTCUluZGlhIFBLSTEXMBUGA1UEAxMOQ0NBIEluZGlhIDIwMDcwHhcN
+MDcwNzAyMDY0MTU5WhcNMTUwNzA0MDYzMDAwWjCBsDELMAkGA1UEBhMCSU4xJDAi
+BgNVBAoTG05hdGlvbmFsIEluZm9ybWF0aWNzIENlbnRyZTEOMA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Djd/aonfyQFCMyfiPpYLx5ElTuqUZeHApJ58+Iprwbu3EIux+C+mfS8QCMY+WYje
+aocCIwIutrmoxIXxGy9yV5OKIe2+4wsCT8aNin+6AV7qNTmFVhp+MF50v69ONTO7
+w2Sa+ire2N5FgklMW2WTCi8d8rwLzaWuse4=
+-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/more-certificates/blacklisted-nic-india-2011.pem b/tests/auto/qsslcertificate/more-certificates/blacklisted-nic-india-2011.pem
new file mode 100644
index 0000000..d3a8c10
--- /dev/null
+++ b/tests/auto/qsslcertificate/more-certificates/blacklisted-nic-india-2011.pem
@@ -0,0 +1,26 @@
+-----BEGIN CERTIFICATE-----
+MIIEWzCCA0OgAwIBAgICJ5IwDQYJKoZIhvcNAQELBQAwOjELMAkGA1UEBhMCSU4x
+EjAQBgNVBAoTCUluZGlhIFBLSTEXMBUGA1UEAxMOQ0NBIEluZGlhIDIwMTEwHhcN
+MTEwMzExMDgxNTExWhcNMTYwMzExMDYzMDAwWjCByDELMAkGA1UEBhMCSU4xJDAi
+BgNVBAoTG05hdGlvbmFsIEluZm9ybWF0aWNzIENlbnRyZTEdMBsGA1UECxMUQ2Vy
+dGlmeWluZyBBdXRob3JpdHkxDzANBgNVBBETBjExMDAwMzEOMAwGA1UECBMFRGVs
+aGkxHjAcBgNVBAkTFUxvZGhpIFJvYWQsIE5ldyBEZWxoaTEdMBsGA1UEMwwUQS1C
+bG9jaywgQ0dPIENvbXBsZXgxFDASBgNVBAMTC05JQyBDQSAyMDExMIIBIjANBgkq
+hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7J/N88MoXcCHTz4A5DKF59+8kvSnriGr
+TEowLSa5NCvH+o89+Mf7V260kKZJ/hQox5RG/F8/gY7u9ziLeypbedeG8EIl88HC
+4x9hT0SNLsrj9qo90waDuGYB4/KQ8q5E6ivVxxV0epzQfFA5A5biKltPBbku/M4D
+iZ+TqBbHxo6nRUEZoukJi0+JLykGI4VpJlQBzow04omxQUZHzvCffo6QvN6FdzZ0
+MopwqaggyfHDFu9o4elCR9Kd/obYlgXAHLYwJlN0pybbe2WpKj81/pxDhKgxrVN+
+OZaI5OMBBkjDRQG+ZyEnQb8XYMNPJbOgQGYgsRdPPjIn7poTzxe7SQIDAQABo4Hb
+MIHYMBIGA1UdEwEB/wQIMAYBAf8CAQEwEQYDVR0OBAoECE5VT66z36FmMBIGA1Ud
+IAQLMAkwBwYFYIJkZAIwEwYDVR0jBAwwCoAITQeoY/LbHN8wLgYIKwYBBQUHAQEE
+IjAgMB4GCCsGAQUFBzABhhJodHRwOi8vb2N2cy5nb3YuaW4wDgYDVR0PAQH/BAQD
+AgEGMEYGA1UdHwQ/MD0wO6A5oDeGNWh0dHA6Ly9jY2EuZ292LmluL3J3L3Jlc291
+cmNlcy9DQ0FJbmRpYTIwMTFMYXRlc3QuY3JsMA0GCSqGSIb3DQEBCwUAA4IBAQB5
+LCqtHbxfO72KRWJbW9dAHNh2xh8n7wstNgSPHLbjL5B0l7RZlCFauy4fjc2faMiB
+xnOq5oEXeIZBrT2NkuEymQ8f0Pzm3pcXrMkFrj78SiA07/cPQShBKKpw39t6puJV
+8ykiVZMZvSCjCzzZZlVO12b2ChADkf6wtseftx5O/zBsqP3Y2+3+KvEeDVtuseKu
+FV2OxSsqSfffJq7IYTwpRPOVzHGJnjV3Igtj3zAzZm8CWxRM/yhnkGyVc+xz/T7o
+WY0870eciR+bmLjZ9j0opudZR6e+lCsMHH2Lxc8C/0XRcCzcganxfWCb/fb0gx44
+iY0a+wWCVebjuyKU/BXk
+-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/more-certificates/blacklisted-nic-india-2014.pem b/tests/auto/qsslcertificate/more-certificates/blacklisted-nic-india-2014.pem
new file mode 100644
index 0000000..5467086
--- /dev/null
+++ b/tests/auto/qsslcertificate/more-certificates/blacklisted-nic-india-2014.pem
@@ -0,0 +1,26 @@
+-----BEGIN CERTIFICATE-----
+MIIEWzCCA0OgAwIB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0wO6A5oDeGNWh0dHA6Ly9jY2EuZ292LmluL3J3L3Jlc291
+cmNlcy9DQ0FJbmRpYTIwMTRMYXRlc3QuY3JsMA0GCSqGSIb3DQEBCwUAA4IBAQCB
+i3iJeUlkfjY96HgfBIUEsLi+knO3VUrxDmwps1YyhgRSt22NQLZ4jksSWLI2EQbn
+9k5tH8rwSbsOWf+TZH7jpaKAVSYi1GhEbGR/C2ZeFiWATwtPWKoVGwx/ksUO9YPM
+zf0wh6fDIuyBJIs/nuN93+L2ib+TS5viNky+HrR3XyqE0z43W5bbzMbido3lbwgr
+drMWD6hCNSZs888L0Se4rn2ei0aPmHmxjDjbExF3NF6m2uYC/wAR4cVIzMvvptFY
+n+SAdG/pwkKHaMVncB/cxxEWiKzOxVpjBsM4N19lpxp2RU/n+x7xRK3WTQvNAZdU
+7pcAYmZIXPu/ES9qpK4f
+-----END CERTIFICATE-----
--
1.9.3

View File

@ -0,0 +1,44 @@
From 6c3b032693acf86a894a8ea3a30c937a1d08ed7f Mon Sep 17 00:00:00 2001
From: aavit <eirik.aavitsland@digia.com>
Date: Tue, 12 Aug 2014 13:54:17 +0200
Subject: [PATCH 65/74] Fix QPainter::drawPolyline() painting errors with
cosmetic pen
Task-number: QTBUG-31579
Change-Id: I8fd2c03ff9a22e4963bfcbcfe196ae4c61b9e10f
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
(cherry picked from qtbase/319cbb7597100f3b65792dc6a0ce2885ce6c0e8c)
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
---
src/gui/painting/qcosmeticstroker.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp
index 5ca652e..1255a3b 100644
--- a/src/gui/painting/qcosmeticstroker.cpp
+++ b/src/gui/painting/qcosmeticstroker.cpp
@@ -533,8 +533,8 @@ void QCosmeticStroker::drawPath(const QVectorPath &path)
QPointF p = QPointF(points[0], points[1]) * state->matrix;
patternOffset = state->lastPen.dashOffset()*64;
- lastPixel.x = -1;
- lastPixel.y = -1;
+ lastPixel.x = INT_MIN;
+ lastPixel.y = INT_MIN;
bool closed;
const QPainterPath::ElementType *e = subPath(type, end, points, &closed);
@@ -588,8 +588,8 @@ void QCosmeticStroker::drawPath(const QVectorPath &path)
QPointF p = QPointF(points[0], points[1]) * state->matrix;
QPointF movedTo = p;
patternOffset = state->lastPen.dashOffset()*64;
- lastPixel.x = -1;
- lastPixel.y = -1;
+ lastPixel.x = INT_MIN;
+ lastPixel.y = INT_MIN;
const qreal *begin = points;
const qreal *end = points + 2*path.elementCount();
--
1.9.3

View File

@ -0,0 +1,37 @@
From 3633f35a607872108fdc3ce06914f7d42a4facdf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lisandro=20Dami=C3=A1n=20Nicanor=20P=C3=A9rez=20Meyer?=
<perezmeyer@gmail.com>
Date: Sat, 23 Aug 2014 15:05:34 -0300
Subject: [PATCH 66/74] Allow Qt4 to also build in ppc64[el le]
This simple patch allows ppc64le (aka ppc64el) to build Qt4.
The original patch was done by Ubuntu's William Grant [0], but
I higly doubt this is copyrighteable.
[0] <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749743#39>
Change-Id: I4cd204e314789337e34b460dda6e18143e3712ec
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index a9ba7c8..ea7cc08 100755
--- a/configure
+++ b/configure
@@ -3229,7 +3229,7 @@ if [ -z "${CFG_HOST_ARCH}" ]; then
fi
CFG_HOST_ARCH=powerpc
;;
- *:*:ppc64)
+ *:*:ppc64*)
if [ "$OPT_VERBOSE" = "yes" ]; then
echo " 64-bit PowerPC (powerpc)"
fi
--
1.9.3

View File

@ -0,0 +1,51 @@
From 93c137ea29f011a267e22fa644a40aba6e3e2d22 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lisandro=20Dami=C3=A1n=20Nicanor=20P=C3=A9rez=20Meyer?=
<perezmeyer@gmail.com>
Date: Wed, 20 Aug 2014 17:52:49 -0300
Subject: [PATCH 67/74] Fix AArch64/arm64 detection.
The detection needs to go before arm, else the system will detect AArch64/arm64
as arm.
This patch comes from Wookey, he has agreed to put it under BSD or Expat
to allow it's inclusion in here:
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=735488#255>
Change-Id: Ic2171c03fca8bb871347940fa3a2bc467776f797
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
---
configure | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/configure b/configure
index ea7cc08..f3a800a 100755
--- a/configure
+++ b/configure
@@ -3241,17 +3241,17 @@ if [ -z "${CFG_HOST_ARCH}" ]; then
fi
CFG_HOST_ARCH=s390
;;
- *:*:arm*)
+ *:*:aarch64*|*:*:arm64*)
if [ "$OPT_VERBOSE" = "yes" ]; then
- echo " ARM (arm)"
+ echo " AArch64 (aarch64)"
fi
- CFG_HOST_ARCH=arm
+ CFG_HOST_ARCH=aarch64
;;
- *:*:aarch64*)
+ *:*:arm*)
if [ "$OPT_VERBOSE" = "yes" ]; then
- echo " AArch64 (aarch64)"
+ echo " ARM (arm)"
fi
- CFG_HOST_ARCH=aarch64
+ CFG_HOST_ARCH=arm
;;
Linux:*:sparc*)
if [ "$OPT_VERBOSE" = "yes" ]; then
--
1.9.3

View File

@ -0,0 +1,41 @@
From 80e3108f5cd1e1850ec81a21100d79a0946addd7 Mon Sep 17 00:00:00 2001
From: Miikka Heikkinen <miikka.heikkinen@digia.com>
Date: Fri, 16 Mar 2012 11:13:55 +0200
Subject: [PATCH 72/74] Fix font cache check in QFontEngineFT::recalcAdvances()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cached font was used regardless of the format, resulting in incorrect
advance in some cases when default format differed from the cached
format.
Task-number: QTBUG-24188
Change-Id: I39e4156bd9ba743afa7e106e934c90227fbf2b8b
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
(cherry picked from qtbase/2ea976c3a713535c2419d936d575e0b24545f0fa)
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Jiang Jiang <gzjjgod@gmail.com>
---
src/gui/text/qfontengine_ft.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
index aecbf76..44a0aca 100644
--- a/src/gui/text/qfontengine_ft.cpp
+++ b/src/gui/text/qfontengine_ft.cpp
@@ -1603,7 +1603,9 @@ void QFontEngineFT::recalcAdvances(QGlyphLayout *glyphs, QTextEngine::ShaperFlag
(flags & HB_ShaperFlag_UseDesignMetrics)) && FT_IS_SCALABLE(freetype->face);
for (int i = 0; i < glyphs->numGlyphs; i++) {
Glyph *g = defaultGlyphSet.getGlyph(glyphs->glyphs[i]);
- if (g) {
+ // Since we are passing Format_None to loadGlyph, use same default format logic as loadGlyph
+ GlyphFormat acceptableFormat = (defaultFormat != Format_None) ? defaultFormat : Format_Mono;
+ if (g && g->format == acceptableFormat) {
glyphs->advances_x[i] = design ? QFixed::fromFixed(g->linearAdvance) : QFixed(g->advance);
} else {
if (!face)
--
1.9.3

View File

@ -1,25 +0,0 @@
--- qt-everywhere-opensource-src-4.8.5/configure 2013-10-10 00:40:17.000000000 +0200
+++ qt-everywhere-opensource-src-4.8.5/configure 2013-10-10 13:47:49.000000000 +0200
@@ -3235,6 +3235,12 @@ if [ -z "${CFG_HOST_ARCH}" ]; then
fi
CFG_HOST_ARCH=powerpc
;;
+ ppc64le:*:*|*:ppc64le:*|*:*:ppc64le)
+ if [ "$OPT_VERBOSE" = "yes" ]; then
+ echo " 64-bit PowerPC little endian (ppc64le)"
+ fi
+ CFG_HOST_ARCH=powerpc
+ ;;
*:*:s390*)
if [ "$OPT_VERBOSE" = "yes" ]; then
echo " IBM S/390 (s390)"
@@ -3299,6 +3305,9 @@ if [ "$PLATFORM" != "$XPLATFORM" -a "$CF
arm*)
CFG_ARCH=arm
;;
+ ppc64le)
+ CFG_ARCH=powerpc
+ ;;
*)
CFG_ARCH="$CFG_EMBEDDED"
;;

View File

@ -1,17 +0,0 @@
diff -up qt-everywhere-opensource-src-4.8.6/src/gui/image/qgifhandler.cpp.QTBUG-38367 qt-everywhere-opensource-src-4.8.6/src/gui/image/qgifhandler.cpp
--- qt-everywhere-opensource-src-4.8.6/src/gui/image/qgifhandler.cpp.QTBUG-38367 2014-04-10 13:37:12.000000000 -0500
+++ qt-everywhere-opensource-src-4.8.6/src/gui/image/qgifhandler.cpp 2014-04-24 15:58:54.515862458 -0500
@@ -359,6 +359,13 @@ int QGIFFormat::decode(QImage *image, co
memset(bits, 0, image->byteCount());
}
+ // Check if the previous attempt to create the image failed. If it
+ // did then the image is broken and we should give up.
+ if (image->isNull()) {
+ state = Error;
+ return -1;
+ }
+
disposePrevious(image);
disposed = false;

33
qt.spec
View File

@ -31,7 +31,7 @@ Summary: Qt toolkit
Name: qt
Epoch: 1
Version: 4.8.6
Release: 12%{?dist}
Release: 13%{?dist}
# See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details
License: (LGPLv2 with exceptions or GPLv3 with exceptions) and ASL 2.0 and BSD and FTL and MIT
@ -168,12 +168,17 @@ Patch185: qt-everywhere-opensource-src-4.8-ppc64le_support.patch
## upstream git
Patch210: 0010-QDbus-Fix-a-b-comparison.patch
Patch223: 0023-Don-t-crash-on-broken-GIF-images.patch
Patch225: 0025-Fix-visual-index-lookup-in-QTreeViewPrivate-adjustVi.patch
Patch230: 0030-Memory-and-file-descriptor-leak-in-QFontCache.patch
Patch234: 0034-Fix-raster-graphics-on-X11-RGB30.patch
Patch247: 0047-QSslCertificate-blacklist-NIC-certificates-from-Indi.patch
Patch265: 0065-Fix-QPainter-drawPolyline-painting-errors-with-cosme.patch
Patch266: 0066-Allow-Qt4-to-also-build-in-ppc64-el-le.patch
Patch267: 0067-Fix-AArch64-arm64-detection.patch
Patch272: 0072-Fix-font-cache-check-in-QFontEngineFT-recalcAdvances.patch
## security patches
# https://bugreports.qt-project.org/browse/QTBUG-38367
Patch300: qt-everywhere-opensource-src-4.8.6-QTBUG-38367.patch
# desktop files
Source20: assistant.desktop
@ -549,14 +554,20 @@ rm -fv mkspecs/linux-g++*/qmake.conf.multilib-optflags
# upstream git
%patch210 -p1 -b .0010
%patch223 -p1 -b .0023
%patch225 -p1 -b .0025
%patch230 -p1 -b .0030
%patch234 -p1 -b .0034
%patch247 -p1 -b .0047
%patch265 -p1 -b .0065
%patch266 -p1 -b .0066
%patch267 -p1 -b .0067
%patch272 -p1 -b .0072
# security fixes
# regression fixes for the security fixes
%patch84 -p1 -b .QTBUG-35459
%patch86 -p1 -b .systemtrayicon
%patch300 -p1 -b .QTBUG-38367
# drop -fexceptions from $RPM_OPT_FLAGS
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'`
@ -1073,6 +1084,7 @@ fi
%{_qt4_bindir}/pixeltool*
%{_qt4_bindir}/qdoc3*
%{_qt4_bindir}/qmake*
%{_qt4_bindir}/qmlviewer
%{_qt4_bindir}/qmlplugindump
%{_qt4_bindir}/qt3to4
%{_qt4_bindir}/qttracereplay
@ -1091,16 +1103,17 @@ fi
%{_bindir}/lrelease*
%{_bindir}/lupdate*
%{_bindir}/moc*
%{_bindir}/qmake*
%{_bindir}/uic*
%{_bindir}/designer*
%{_bindir}/linguist*
%{_bindir}/lconvert
%{_bindir}/pixeltool
%{_bindir}/qcollectiongenerator
%{_bindir}/qdoc3
%{_bindir}/qmake*
%{_bindir}/qmlviewer
%{_bindir}/qt3to4
%{_bindir}/qttracereplay
%{_bindir}/qcollectiongenerator
%if 0%{?dbus:1}
%{_bindir}/qdbuscpp2xml
%{_bindir}/qdbusxml2cpp
@ -1241,10 +1254,6 @@ fi
%exclude %{_qt4_plugindir}/designer/libqwebview.so
%endif
%exclude %{_qt4_plugindir}/sqldrivers
%if "%{_qt4_bindir}" != "%{_bindir}"
%{_bindir}/qmlviewer
%endif
%{_qt4_bindir}/qmlviewer
%{_datadir}/icons/hicolor/*/apps/qt4-logo.*
%if 0%{?dbus:1}
@ -1271,6 +1280,10 @@ fi
%changelog
* Tue Sep 16 2014 Rex Dieter <rdieter@fedoraproject.org> - 1:4.8.6-13
- move qmlviewer to -devel
- pull in some upstream fixes
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:4.8.6-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild