extra/qt to 4.8.4-1

This commit is contained in:
Kevin Mihelich 2012-11-30 17:57:17 +00:00
parent 892a4f1b6c
commit 3922497a62
4 changed files with 10 additions and 189 deletions

View file

@ -12,8 +12,8 @@
pkgbase=qt
pkgname=('qt' 'qt-private-headers')
pkgver=4.8.3
pkgrel=6
pkgver=4.8.4
pkgrel=1
arch=('i686' 'x86_64')
url='http://qt-project.org/'
license=('GPL3' 'LGPL')
@ -27,20 +27,14 @@ source=("http://releases.qt-project.org/qt4/source/${_pkgfqn}.tar.gz"
'assistant.desktop' 'designer.desktop' 'linguist.desktop'
'qtconfig.desktop'
'improve-cups-support.patch'
'fix-crash-in-assistant.patch'
'disable-ssl-compression.patch'
'fix-qtscript-crash.patch'
'qsortfilterproxymodel.patch')
md5sums=('a663b6c875f8d7caa8ac9c30e4a4ec3b'
'fc211414130ab2764132e7370f8e5caa'
'85179f5e0437514f8639957e1d8baf62'
'f11852b97583610f3dbb669ebc3e21bc'
'6b771c8a81dd90b45e8a79afa0e5bbfd'
'b9fb6b953cec428d59c026b1ef370e86'
'57590084078b6379f0501f7728b02ae2'
'94e9e433342018bf35e8d6d968b7432c'
'71579422635e9343665de1c1ba5a3f91'
'cd550cd628d10459128ca5f231ca6d3f')
'fix-crash-in-assistant.patch')
md5sums=('89c5ecba180cae74c66260ac732dc5cb'
'f1837a03fd0ebbd2da58975845f278e3'
'480fea1ed076992b688373c8db274be0'
'5595c24d5bb942c21e3a4d299e6d0bf1'
'824a3b77a25e98567f640e0441ccdebc'
'c439c7731c25387352d8453ca7574971'
'57590084078b6379f0501f7728b02ae2')
build() {
cd ${_pkgfqn}
@ -50,15 +44,6 @@ build() {
patch -p1 -i "${srcdir}"/fix-crash-in-assistant.patch
# Security fix
patch -p1 -i "${srcdir}"/disable-ssl-compression.patch
# QTBUG#27322
patch -p1 -i "${srcdir}"/fix-qtscript-crash.patch
# QTBUG#27122
patch -p1 -i "${srcdir}"/qsortfilterproxymodel.patch
export QT4DIR="${srcdir}"/${_pkgfqn}
export LD_LIBRARY_PATH=${QT4DIR}/lib:${LD_LIBRARY_PATH}

View file

@ -1,67 +0,0 @@
From d41dc3e101a694dec98d7bbb582d428d209e5401 Mon Sep 17 00:00:00 2001
From: Richard Moore <rich@kde.org>
Date: Fri, 14 Sep 2012 00:13:08 +0100
Subject: [PATCH] Disable SSL compression by default.
Disable SSL compression by default since this appears to be the a likely
cause of the currently hyped CRIME attack.
This is a backport of 5ea896fbc63593f424a7dfbb11387599c0025c74
Change-Id: I6eeefb23c6b140a9633b28ed85879459c474348a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Peter Hartmann <phartmann@rim.com>
---
src/network/ssl/qssl.cpp | 5 +++--
src/network/ssl/qsslconfiguration.cpp | 4 +++-
src/network/ssl/qsslconfiguration_p.h | 4 +++-
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/network/ssl/qssl.cpp b/src/network/ssl/qssl.cpp
index 49e086f..9578178 100644
--- a/src/network/ssl/qssl.cpp
+++ b/src/network/ssl/qssl.cpp
@@ -148,8 +148,9 @@ QT_BEGIN_NAMESPACE
By default, SslOptionDisableEmptyFragments is turned on since this causes
problems with a large number of servers. SslOptionDisableLegacyRenegotiation
- is also turned on, since it introduces a security risk. The other options
- are turned off.
+ is also turned on, since it introduces a security risk.
+ SslOptionDisableCompression is turned on to prevent the attack publicised by
+ CRIME. The other options are turned off.
Note: Availability of above options depends on the version of the SSL
backend in use.
diff --git a/src/network/ssl/qsslconfiguration.cpp b/src/network/ssl/qsslconfiguration.cpp
index 24c7b77..3a05f54 100644
--- a/src/network/ssl/qsslconfiguration.cpp
+++ b/src/network/ssl/qsslconfiguration.cpp
@@ -201,7 +201,9 @@ bool QSslConfiguration::isNull() const
d->privateKey.isNull() &&
d->peerCertificate.isNull() &&
d->peerCertificateChain.count() == 0 &&
- d->sslOptions == (QSsl::SslOptionDisableEmptyFragments|QSsl::SslOptionDisableLegacyRenegotiation));
+ d->sslOptions == ( QSsl::SslOptionDisableEmptyFragments
+ |QSsl::SslOptionDisableLegacyRenegotiation
+ |QSsl::SslOptionDisableCompression));
}
/*!
diff --git a/src/network/ssl/qsslconfiguration_p.h b/src/network/ssl/qsslconfiguration_p.h
index 74f17cd..c36b651 100644
--- a/src/network/ssl/qsslconfiguration_p.h
+++ b/src/network/ssl/qsslconfiguration_p.h
@@ -83,7 +83,9 @@ public:
: protocol(QSsl::SecureProtocols),
peerVerifyMode(QSslSocket::AutoVerifyPeer),
peerVerifyDepth(0),
- sslOptions(QSsl::SslOptionDisableEmptyFragments|QSsl::SslOptionDisableLegacyRenegotiation)
+ sslOptions(QSsl::SslOptionDisableEmptyFragments
+ |QSsl::SslOptionDisableLegacyRenegotiation
+ |QSsl::SslOptionDisableCompression)
{ }
QSslCertificate peerCertificate;
--
1.7.10

View file

@ -1,34 +0,0 @@
From e6b7178bc2e62a37b4737695bced1b46bced9215 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C4=99drzej=20Nowacki?= <jedrzej.nowacki@digia.com>
Date: Mon, 22 Oct 2012 15:17:19 +0200
Subject: [PATCH] Fix mmap usage.
Add missing MAP_NORESERVE and fix error checking.
Special thanks to Olivier JG for debugging the issue.
Task-number: QTBUG-27322
Change-Id: Ia9f4aa80415f0127318714912b524131a5b0f18a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
---
.../JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp
index 16d0fb1..e1237e4 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp
@@ -305,8 +305,8 @@ public:
randomLocation += (1 << 24);
randomLocation <<= 21;
#endif
- m_base = mmap(reinterpret_cast<void*>(randomLocation), m_totalHeapSize, INITIAL_PROTECTION_FLAGS, MAP_PRIVATE | MAP_ANON, VM_TAG_FOR_EXECUTABLEALLOCATOR_MEMORY, 0);
- if (!m_base)
+ m_base = mmap(reinterpret_cast<void*>(randomLocation), m_totalHeapSize, INITIAL_PROTECTION_FLAGS, MAP_PRIVATE | MAP_ANON | MAP_NORESERVE, VM_TAG_FOR_EXECUTABLEALLOCATOR_MEMORY, 0);
+ if (m_base == MAP_FAILED)
CRASH();
// For simplicity, we keep all memory in m_freeList in a 'released' state.
--
1.8.0

View file

@ -1,63 +0,0 @@
From 989e6c5ee6f3e38b24632ec5caf49c5b03d17aed Mon Sep 17 00:00:00 2001
From: Stephen Kelly <stephen.kelly@kdab.com>
Date: Fri, 14 Sep 2012 15:42:34 +0200
Subject: [PATCH] Fix crash when invalidating a QSortFilterProxyModel
Backport of d7a15fbfd93fb566c7793596ea50d8786b9eb654 from qtbase.
Task-number: QTBUG-27122
Change-Id: I0b1eda292fd9648e6f08629f7a069b66bb8b59e8
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
---
src/gui/itemviews/qsortfilterproxymodel.cpp | 28 +++++++---
.../tst_qsortfilterproxymodel.cpp | 61 ++++++++++++++++++++++
2 files changed, 83 insertions(+), 6 deletions(-)
diff --git a/src/gui/itemviews/qsortfilterproxymodel.cpp b/src/gui/itemviews/qsortfilterproxymodel.cpp
index d937b63..9fe224e 100644
--- a/src/gui/itemviews/qsortfilterproxymodel.cpp
+++ b/src/gui/itemviews/qsortfilterproxymodel.cpp
@@ -1036,18 +1036,34 @@ void QSortFilterProxyModelPrivate::filter_changed(const QModelIndex &source_pare
Mapping *m = it.value();
QSet<int> rows_removed = handle_filter_changed(m->proxy_rows, m->source_rows, source_parent, Qt::Vertical);
QSet<int> columns_removed = handle_filter_changed(m->proxy_columns, m->source_columns, source_parent, Qt::Horizontal);
- QVector<QModelIndex> mappedChildren = m->mapped_children;
- QVector<QModelIndex>::iterator it2 = mappedChildren.end();
- while (it2 != mappedChildren.begin()) {
- --it2;
- const QModelIndex source_child_index = *it2;
+
+ // We need to iterate over a copy of m->mapped_children because otherwise it may be changed by other code, invalidating
+ // the iterator it2.
+ // The m->mapped_children vector can be appended to with indexes which are no longer filtered
+ // out (in create_mapping) when this function recurses for child indexes.
+ const QVector<QModelIndex> mappedChildren = m->mapped_children;
+ QVector<int> indexesToRemove;
+ for (int i = 0; i < mappedChildren.size(); ++i) {
+ const QModelIndex source_child_index = mappedChildren.at(i);
if (rows_removed.contains(source_child_index.row()) || columns_removed.contains(source_child_index.column())) {
- it2 = mappedChildren.erase(it2);
+ indexesToRemove.push_back(i);
remove_from_mapping(source_child_index);
} else {
filter_changed(source_child_index);
}
}
+ QVector<int>::const_iterator removeIt = indexesToRemove.constEnd();
+ const QVector<int>::const_iterator removeBegin = indexesToRemove.constBegin();
+
+ // We can't just remove these items from mappedChildren while iterating above and then
+ // do something like m->mapped_children = mappedChildren, because mapped_children might
+ // be appended to in create_mapping, and we would lose those new items.
+ // Because they are always appended in create_mapping, we can still remove them by
+ // position here.
+ while (removeIt != removeBegin) {
+ --removeIt;
+ m->mapped_children.remove(*removeIt);
+ }
}
/*!
--
1.8.0