update to upstream version 5.15.2
This commit is contained in:
parent
2818cdff4d
commit
65f6bc2444
@ -1,26 +0,0 @@
|
|||||||
From a52d7861edfb5956de38ba80015c4dd0b596259b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
||||||
Date: Tue, 13 Nov 2018 16:00:23 +0100
|
|
||||||
Subject: [PATCH] Fix compile issue with gcc 9
|
|
||||||
|
|
||||||
It appears messenne_twisters in the latest libstdc++ has one more
|
|
||||||
requirement before it is willing to construct with our
|
|
||||||
SystemGenerator struct as an sseq provider.
|
|
||||||
|
|
||||||
Change-Id: If38151d1fa6f40a80274acc26d9ed6b4ac6049fe
|
|
||||||
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|
|
||||||
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
||||||
---
|
|
||||||
|
|
||||||
diff --git a/src/corelib/global/qrandom.cpp b/src/corelib/global/qrandom.cpp
|
|
||||||
index 23e5e49..03534cf 100644
|
|
||||||
--- a/src/corelib/global/qrandom.cpp
|
|
||||||
+++ b/src/corelib/global/qrandom.cpp
|
|
||||||
@@ -218,6 +218,7 @@
|
|
||||||
#endif // Q_OS_WINRT
|
|
||||||
|
|
||||||
static SystemGenerator &self();
|
|
||||||
+ typedef quint32 result_type;
|
|
||||||
void generate(quint32 *begin, quint32 *end) Q_DECL_NOEXCEPT_EXPR(FillBufferNoexcept);
|
|
||||||
|
|
||||||
// For std::mersenne_twister_engine implementations that use something
|
|
||||||
233
0001-modify-kwin_5.18-complier-error.patch
Normal file
233
0001-modify-kwin_5.18-complier-error.patch
Normal file
@ -0,0 +1,233 @@
|
|||||||
|
From bc16340b2eee8b7f7c7a8fd4cf7ba0c288bfc6bc Mon Sep 17 00:00:00 2001
|
||||||
|
From: pei-jiankang <peijiankang@kylinos.cn>
|
||||||
|
Date: Wed, 10 Nov 2021 22:09:24 +0800
|
||||||
|
Subject: [PATCH] modify-kwin_5.18-complier-error
|
||||||
|
|
||||||
|
---
|
||||||
|
examples/corelib/serialization/cbordump/main.cpp | 8 ++++----
|
||||||
|
.../src_corelib_serialization_qcborstream.cpp | 2 +-
|
||||||
|
src/corelib/serialization/qcborcommon.h | 4 ++--
|
||||||
|
src/corelib/serialization/qcborstreamreader.h | 6 +++---
|
||||||
|
src/corelib/serialization/qcborstreamwriter.h | 2 +-
|
||||||
|
src/corelib/serialization/qcborvalue.cpp | 4 ++--
|
||||||
|
src/corelib/serialization/qcborvalue.h | 4 ++--
|
||||||
|
.../corelib/kernel/qmetatype/tst_qmetatype.h | 2 +-
|
||||||
|
.../qcborstreamreader/tst_qcborstreamreader.cpp | 8 ++++----
|
||||||
|
.../serialization/qcborvalue/tst_qcborvalue.cpp | 16 ++++++++--------
|
||||||
|
10 files changed, 28 insertions(+), 28 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/examples/corelib/serialization/cbordump/main.cpp b/examples/corelib/serialization/cbordump/main.cpp
|
||||||
|
index 222bd436..b43650eb 100644
|
||||||
|
--- a/examples/corelib/serialization/cbordump/main.cpp
|
||||||
|
+++ b/examples/corelib/serialization/cbordump/main.cpp
|
||||||
|
@@ -385,10 +385,10 @@ void CborDumper::dumpOne(int nestingLevel)
|
||||||
|
|
||||||
|
case QCborStreamReader::SimpleType:
|
||||||
|
switch (reader.toSimpleType()) {
|
||||||
|
- case QCborSimpleType::False:
|
||||||
|
+ case QCborSimpleType::False_QCb:
|
||||||
|
printf("false");
|
||||||
|
break;
|
||||||
|
- case QCborSimpleType::True:
|
||||||
|
+ case QCborSimpleType::True_QCb:
|
||||||
|
printf("true");
|
||||||
|
break;
|
||||||
|
case QCborSimpleType::Null:
|
||||||
|
@@ -620,10 +620,10 @@ void CborDumper::dumpOneDetailed(int nestingLevel)
|
||||||
|
QCborSimpleType st = reader.toSimpleType();
|
||||||
|
reader.next();
|
||||||
|
switch (st) {
|
||||||
|
- case QCborSimpleType::False:
|
||||||
|
+ case QCborSimpleType::False_QCb:
|
||||||
|
print("Simple Type", "false");
|
||||||
|
break;
|
||||||
|
- case QCborSimpleType::True:
|
||||||
|
+ case QCborSimpleType::True_QCb:
|
||||||
|
print("Simple Type", "true");
|
||||||
|
break;
|
||||||
|
case QCborSimpleType::Null:
|
||||||
|
diff --git a/src/corelib/doc/snippets/code/src_corelib_serialization_qcborstream.cpp b/src/corelib/doc/snippets/code/src_corelib_serialization_qcborstream.cpp
|
||||||
|
index 6ddb5a93..993a0a03 100644
|
||||||
|
--- a/src/corelib/doc/snippets/code/src_corelib_serialization_qcborstream.cpp
|
||||||
|
+++ b/src/corelib/doc/snippets/code/src_corelib_serialization_qcborstream.cpp
|
||||||
|
@@ -192,7 +192,7 @@
|
||||||
|
//! [15]
|
||||||
|
|
||||||
|
//! [16]
|
||||||
|
- writer.append(b ? QCborSimpleType::True : QCborSimpleType::False);
|
||||||
|
+ writer.append(b ? QCborSimpleType::True_QCb : QCborSimpleType::False_QCb);
|
||||||
|
//! [16]
|
||||||
|
|
||||||
|
//! [17]
|
||||||
|
diff --git a/src/corelib/serialization/qcborcommon.h b/src/corelib/serialization/qcborcommon.h
|
||||||
|
index bec46399..1d80e076 100644
|
||||||
|
--- a/src/corelib/serialization/qcborcommon.h
|
||||||
|
+++ b/src/corelib/serialization/qcborcommon.h
|
||||||
|
@@ -58,8 +58,8 @@
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
enum class QCborSimpleType : quint8 {
|
||||||
|
- False = 20,
|
||||||
|
- True = 21,
|
||||||
|
+ False_QCb = 20,
|
||||||
|
+ True_QCb = 21,
|
||||||
|
Null = 22,
|
||||||
|
Undefined = 23
|
||||||
|
};
|
||||||
|
diff --git a/src/corelib/serialization/qcborstreamreader.h b/src/corelib/serialization/qcborstreamreader.h
|
||||||
|
index 6d5feccf..1fd22b79 100644
|
||||||
|
--- a/src/corelib/serialization/qcborstreamreader.h
|
||||||
|
+++ b/src/corelib/serialization/qcborstreamreader.h
|
||||||
|
@@ -140,8 +140,8 @@ public:
|
||||||
|
bool isInvalid() const { return type() == Invalid; }
|
||||||
|
|
||||||
|
bool isSimpleType(QCborSimpleType st) const { return isSimpleType() && toSimpleType() == st; }
|
||||||
|
- bool isFalse() const { return isSimpleType(QCborSimpleType::False); }
|
||||||
|
- bool isTrue() const { return isSimpleType(QCborSimpleType::True); }
|
||||||
|
+ bool isFalse() const { return isSimpleType(QCborSimpleType::False_QCb); }
|
||||||
|
+ bool isTrue() const { return isSimpleType(QCborSimpleType::True_QCb); }
|
||||||
|
bool isBool() const { return isFalse() || isTrue(); }
|
||||||
|
bool isNull() const { return isSimpleType(QCborSimpleType::Null); }
|
||||||
|
bool isUndefined() const { return isSimpleType(QCborSimpleType::Undefined); }
|
||||||
|
@@ -158,7 +158,7 @@ public:
|
||||||
|
qsizetype currentStringChunkSize() const{ Q_ASSERT(isString() || isByteArray()); return _currentStringChunkSize(); }
|
||||||
|
StringResult<qsizetype> readStringChunk(char *ptr, qsizetype maxlen);
|
||||||
|
|
||||||
|
- bool toBool() const { Q_ASSERT(isBool()); return value64 - int(QCborSimpleType::False); }
|
||||||
|
+ bool toBool() const { Q_ASSERT(isBool()); return value64 - int(QCborSimpleType::False_QCb); }
|
||||||
|
QCborTag toTag() const { Q_ASSERT(isTag()); return QCborTag(value64); }
|
||||||
|
quint64 toUnsignedInteger() const { Q_ASSERT(isUnsignedInteger()); return value64; }
|
||||||
|
QCborNegativeInteger toNegativeInteger() const { Q_ASSERT(isNegativeInteger()); return QCborNegativeInteger(value64 + 1); }
|
||||||
|
diff --git a/src/corelib/serialization/qcborstreamwriter.h b/src/corelib/serialization/qcborstreamwriter.h
|
||||||
|
index f8c94ceb..befea659 100644
|
||||||
|
--- a/src/corelib/serialization/qcborstreamwriter.h
|
||||||
|
+++ b/src/corelib/serialization/qcborstreamwriter.h
|
||||||
|
@@ -93,7 +93,7 @@ public:
|
||||||
|
void appendTextString(const char *utf8, qsizetype len);
|
||||||
|
|
||||||
|
// convenience
|
||||||
|
- void append(bool b) { append(b ? QCborSimpleType::True : QCborSimpleType::False); }
|
||||||
|
+ void append(bool b) { append(b ? QCborSimpleType::True_QCb : QCborSimpleType::False_QCb); }
|
||||||
|
void appendNull() { append(QCborSimpleType::Null); }
|
||||||
|
void appendUndefined() { append(QCborSimpleType::Undefined); }
|
||||||
|
|
||||||
|
diff --git a/src/corelib/serialization/qcborvalue.cpp b/src/corelib/serialization/qcborvalue.cpp
|
||||||
|
index 89a928d3..465b8d20 100644
|
||||||
|
--- a/src/corelib/serialization/qcborvalue.cpp
|
||||||
|
+++ b/src/corelib/serialization/qcborvalue.cpp
|
||||||
|
@@ -3060,9 +3060,9 @@ QDebug operator<<(QDebug dbg, const QCborValue &v)
|
||||||
|
Q_CORE_EXPORT const char *qt_cbor_simpletype_id(QCborSimpleType st)
|
||||||
|
{
|
||||||
|
switch (st) {
|
||||||
|
- case QCborSimpleType::False:
|
||||||
|
+ case QCborSimpleType::False_QCb:
|
||||||
|
return "False";
|
||||||
|
- case QCborSimpleType::True:
|
||||||
|
+ case QCborSimpleType::True_QCb:
|
||||||
|
return "True";
|
||||||
|
case QCborSimpleType::Null:
|
||||||
|
return "Null";
|
||||||
|
diff --git a/src/corelib/serialization/qcborvalue.h b/src/corelib/serialization/qcborvalue.h
|
||||||
|
index aa51e5da..b96d500d 100644
|
||||||
|
--- a/src/corelib/serialization/qcborvalue.h
|
||||||
|
+++ b/src/corelib/serialization/qcborvalue.h
|
||||||
|
@@ -117,8 +117,8 @@ public:
|
||||||
|
|
||||||
|
// range 0x100 - 0x1ff for Simple Types
|
||||||
|
SimpleType = 0x100,
|
||||||
|
- False = SimpleType + int(QCborSimpleType::False),
|
||||||
|
- True = SimpleType + int(QCborSimpleType::True),
|
||||||
|
+ False = SimpleType + int(QCborSimpleType::False_QCb),
|
||||||
|
+ True = SimpleType + int(QCborSimpleType::True_QCb),
|
||||||
|
Null = SimpleType + int(QCborSimpleType::Null),
|
||||||
|
Undefined = SimpleType + int(QCborSimpleType::Undefined),
|
||||||
|
|
||||||
|
diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h
|
||||||
|
index 22bcb69a..4d5bdc1a 100644
|
||||||
|
--- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h
|
||||||
|
+++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.h
|
||||||
|
@@ -275,7 +275,7 @@ template<> struct TestValueFactory<QMetaType::QJsonDocument> {
|
||||||
|
};
|
||||||
|
|
||||||
|
template<> struct TestValueFactory<QMetaType::QCborSimpleType> {
|
||||||
|
- static QCborSimpleType *create() { return new QCborSimpleType(QCborSimpleType::True); }
|
||||||
|
+ static QCborSimpleType *create() { return new QCborSimpleType(QCborSimpleType::True_QCb); }
|
||||||
|
};
|
||||||
|
template<> struct TestValueFactory<QMetaType::QCborValue> {
|
||||||
|
static QCborValue *create() { return new QCborValue(123.); }
|
||||||
|
diff --git a/tests/auto/corelib/serialization/qcborstreamreader/tst_qcborstreamreader.cpp b/tests/auto/corelib/serialization/qcborstreamreader/tst_qcborstreamreader.cpp
|
||||||
|
index f969bb90..a4d75422 100644
|
||||||
|
--- a/tests/auto/corelib/serialization/qcborstreamreader/tst_qcborstreamreader.cpp
|
||||||
|
+++ b/tests/auto/corelib/serialization/qcborstreamreader/tst_qcborstreamreader.cpp
|
||||||
|
@@ -454,10 +454,10 @@ static QString parseOne(QCborStreamReader &reader)
|
||||||
|
}
|
||||||
|
case QCborStreamReader::SimpleType:
|
||||||
|
switch (reader.toSimpleType()) {
|
||||||
|
- case QCborSimpleType::False:
|
||||||
|
+ case QCborSimpleType::False_QCb:
|
||||||
|
result = QStringLiteral("false");
|
||||||
|
break;
|
||||||
|
- case QCborSimpleType::True:
|
||||||
|
+ case QCborSimpleType::True_QCb:
|
||||||
|
result = QStringLiteral("true");
|
||||||
|
break;
|
||||||
|
case QCborSimpleType::Null:
|
||||||
|
@@ -577,10 +577,10 @@ bool parseNonRecursive(QString &result, bool &printingStringChunks, QCborStreamR
|
||||||
|
continue; // skip the comma
|
||||||
|
case QCborStreamReader::SimpleType:
|
||||||
|
switch (reader.toSimpleType()) {
|
||||||
|
- case QCborSimpleType::False:
|
||||||
|
+ case QCborSimpleType::False_QCb:
|
||||||
|
result += QStringLiteral("false");
|
||||||
|
break;
|
||||||
|
- case QCborSimpleType::True:
|
||||||
|
+ case QCborSimpleType::True_QCb:
|
||||||
|
result += QStringLiteral("true");
|
||||||
|
break;
|
||||||
|
case QCborSimpleType::Null:
|
||||||
|
diff --git a/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp b/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp
|
||||||
|
index 0a780d3e..cf3f9df3 100644
|
||||||
|
--- a/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp
|
||||||
|
+++ b/tests/auto/corelib/serialization/qcborvalue/tst_qcborvalue.cpp
|
||||||
|
@@ -240,12 +240,12 @@ void tst_QCborValue::basics_data()
|
||||||
|
add(QCborValue::Null, QCborValue::Null, st(QCborSimpleType::Null));
|
||||||
|
QTest::newRow("nullptr") << QCborValue::Null << QCborValue(nullptr)
|
||||||
|
<< st(QCborSimpleType::Null);
|
||||||
|
- add(QCborValue::False, false, st(QCborSimpleType::False));
|
||||||
|
+ add(QCborValue::False, false, st(QCborSimpleType::False_QCb));
|
||||||
|
QTest::newRow("false") << QCborValue::False << QCborValue(QCborValue::False)
|
||||||
|
- << st(QCborSimpleType::False);
|
||||||
|
- add(QCborValue::True, true, st(QCborSimpleType::True));
|
||||||
|
+ << st(QCborSimpleType::False_QCb);
|
||||||
|
+ add(QCborValue::True, true, st(QCborSimpleType::True_QCb));
|
||||||
|
QTest::newRow("true") << QCborValue::True << QCborValue(QCborValue::True)
|
||||||
|
- << st(QCborSimpleType::True);
|
||||||
|
+ << st(QCborSimpleType::True_QCb);
|
||||||
|
QTest::newRow("simpletype") << QCborValue::Type(QCborValue::SimpleType + 255)
|
||||||
|
<< QCborValue(QCborSimpleType(255))
|
||||||
|
<< st(QCborSimpleType(255));
|
||||||
|
@@ -297,8 +297,8 @@ static void basicTypeCheck(QCborValue::Type type, const QCborValue &v, const QVa
|
||||||
|
QCOMPARE(v.isInvalid(), type == QCborValue::Invalid);
|
||||||
|
QCOMPARE(v.isContainer(), type == QCborValue::Array || type == QCborValue::Map);
|
||||||
|
QCOMPARE(v.isSimpleType(), isSimpleType);
|
||||||
|
- QCOMPARE(v.isSimpleType(QCborSimpleType::False), st == QCborSimpleType::False);
|
||||||
|
- QCOMPARE(v.isSimpleType(QCborSimpleType::True), st == QCborSimpleType::True);
|
||||||
|
+ QCOMPARE(v.isSimpleType(QCborSimpleType::False_QCb), st == QCborSimpleType::False_QCb);
|
||||||
|
+ QCOMPARE(v.isSimpleType(QCborSimpleType::True_QCb), st == QCborSimpleType::True_QCb);
|
||||||
|
QCOMPARE(v.isSimpleType(QCborSimpleType::Null), st == QCborSimpleType::Null);
|
||||||
|
QCOMPARE(v.isSimpleType(QCborSimpleType::Undefined), st == QCborSimpleType::Undefined);
|
||||||
|
QCOMPARE(v.isSimpleType(QCborSimpleType(255)), st == QCborSimpleType(255));
|
||||||
|
@@ -310,8 +310,8 @@ static void basicTypeCheck(QCborValue::Type type, const QCborValue &v, const QVa
|
||||||
|
QCOMPARE(v.toInteger(), qint64(expectedValue.toDouble()));
|
||||||
|
QCOMPARE(v.toDouble(), expectedValue.toDouble());
|
||||||
|
}
|
||||||
|
- QCOMPARE(v.toBool(true), st != QCborSimpleType::False);
|
||||||
|
- QCOMPARE(v.toBool(), st == QCborSimpleType::True);
|
||||||
|
+ QCOMPARE(v.toBool(true), st != QCborSimpleType::False_QCb);
|
||||||
|
+ QCOMPARE(v.toBool(), st == QCborSimpleType::True_QCb);
|
||||||
|
if (st == QCborSimpleType::Undefined)
|
||||||
|
QCOMPARE(v.toSimpleType(QCborSimpleType::Null), QCborSimpleType::Undefined);
|
||||||
|
else if (isSimpleType)
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
@ -1,159 +0,0 @@
|
|||||||
From fd4be84d23a0db4186cb42e736a9de3af722c7f7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lars Knoll <lars.knoll@qt.io>
|
|
||||||
Date: Wed, 26 Feb 2020 10:42:10 +0100
|
|
||||||
Subject: Add an expansion limit for entities
|
|
||||||
|
|
||||||
Recursively defined entities can easily exhaust all available
|
|
||||||
memory. Limit entity expansion to a default of 4096 characters to
|
|
||||||
avoid DoS attacks when a user loads untrusted content.
|
|
||||||
|
|
||||||
Added a setter and getter to allow modifying the expansion limit.
|
|
||||||
|
|
||||||
[ChangeLog][QtCore][QXmlStream] QXmlStreamReader does now by default
|
|
||||||
limit the expansion of entities to 4096 characters. Documents where
|
|
||||||
a single entity expands to more characters than the limit are not
|
|
||||||
considered well formed. The limit is there to avoid DoS attacks through
|
|
||||||
recursively expanding entities when loading untrusted content. The
|
|
||||||
limit can be changed through the QXmlStreamReader::setEntityExpansionLimit()
|
|
||||||
method.
|
|
||||||
|
|
||||||
Fixes: QTBUG-47417
|
|
||||||
Change-Id: I94387815d74fcf34783e136387ee57fac5ded0c9
|
|
||||||
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
|
|
||||||
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
||||||
---
|
|
||||||
src/corelib/serialization/qxmlstream.cpp | 36 ++++++++++++++++++
|
|
||||||
src/corelib/serialization/qxmlstream.g | 14 ++++++-
|
|
||||||
src/corelib/serialization/qxmlstream.h | 2 +
|
|
||||||
src/corelib/serialization/qxmlstream_p.h | 14 ++++++-
|
|
||||||
.../serialization/qxmlstream/tst_qxmlstream.cpp | 44 +++++++++++++++++++++-
|
|
||||||
5 files changed, 106 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/corelib/serialization/qxmlstream.cpp b/src/corelib/serialization/qxmlstream.cpp
|
|
||||||
index 7ff87885a5..d7fb0d0d41 100644
|
|
||||||
--- a/src/corelib/serialization/qxmlstream.cpp
|
|
||||||
+++ b/src/corelib/serialization/qxmlstream.cpp
|
|
||||||
@@ -2041,6 +2041,42 @@ QStringRef QXmlStreamReader::dtdSystemId() const
|
|
||||||
return QStringRef();
|
|
||||||
}
|
|
||||||
|
|
||||||
+/*!
|
|
||||||
+ \since 5.15
|
|
||||||
+
|
|
||||||
+ Returns the maximum amount of characters a single entity is
|
|
||||||
+ allowed to expand into. If a single entity expands past the
|
|
||||||
+ given limit, the document is not considered well formed.
|
|
||||||
+
|
|
||||||
+ \sa setEntityExpansionLimit
|
|
||||||
+*/
|
|
||||||
+int QXmlStreamReader::entityExpansionLimit() const
|
|
||||||
+{
|
|
||||||
+ Q_D(const QXmlStreamReader);
|
|
||||||
+ return d->entityExpansionLimit;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/*!
|
|
||||||
+ \since 5.15
|
|
||||||
+
|
|
||||||
+ Sets the maximum amount of characters a single entity is
|
|
||||||
+ allowed to expand into to \a limit. If a single entity expands
|
|
||||||
+ past the given limit, the document is not considered well formed.
|
|
||||||
+
|
|
||||||
+ The limit is there to prevent DoS attacks when loading unknown
|
|
||||||
+ XML documents where recursive entity expansion could otherwise
|
|
||||||
+ exhaust all available memory.
|
|
||||||
+
|
|
||||||
+ The default value for this property is 4096 characters.
|
|
||||||
+
|
|
||||||
+ \sa entityExpansionLimit
|
|
||||||
+*/
|
|
||||||
+void QXmlStreamReader::setEntityExpansionLimit(int limit)
|
|
||||||
+{
|
|
||||||
+ Q_D(QXmlStreamReader);
|
|
||||||
+ d->entityExpansionLimit = limit;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/*! If the tokenType() is \l StartElement, this function returns the
|
|
||||||
element's namespace declarations. Otherwise an empty vector is
|
|
||||||
returned.
|
|
||||||
diff --git a/src/corelib/serialization/qxmlstream.g b/src/corelib/serialization/qxmlstream.g
|
|
||||||
index 12ecc9bdb2..b623de9505 100644
|
|
||||||
--- a/src/corelib/serialization/qxmlstream.g
|
|
||||||
+++ b/src/corelib/serialization/qxmlstream.g
|
|
||||||
@@ -285,9 +285,19 @@ public:
|
|
||||||
QHash<QStringView, Entity> entityHash;
|
|
||||||
QHash<QStringView, Entity> parameterEntityHash;
|
|
||||||
QXmlStreamSimpleStack<Entity *>entityReferenceStack;
|
|
||||||
+ int entityExpansionLimit = 4096;
|
|
||||||
+ int entityLength = 0;
|
|
||||||
inline bool referenceEntity(Entity &entity) {
|
|
||||||
if (entity.isCurrentlyReferenced) {
|
|
||||||
- raiseWellFormedError(QXmlStream::tr("Recursive entity detected."));
|
|
||||||
+ raiseWellFormedError(QXmlStream::tr("Self-referencing entity detected."));
|
|
||||||
+ return false;
|
|
||||||
+ }
|
|
||||||
+ // entityLength represents the amount of additional characters the
|
|
||||||
+ // entity expands into (can be negative for e.g. &). It's used to
|
|
||||||
+ // avoid DoS attacks through recursive entity expansions
|
|
||||||
+ entityLength += entity.value.size() - entity.name.size() - 2;
|
|
||||||
+ if (entityLength > entityExpansionLimit) {
|
|
||||||
+ raiseWellFormedError(QXmlStream::tr("Entity expands to more characters than the entity expansion limit."));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
entity.isCurrentlyReferenced = true;
|
|
||||||
@@ -838,6 +848,8 @@ entity_done ::= ENTITY_DONE;
|
|
||||||
/.
|
|
||||||
case $rule_number:
|
|
||||||
entityReferenceStack.pop()->isCurrentlyReferenced = false;
|
|
||||||
+ if (entityReferenceStack.isEmpty())
|
|
||||||
+ entityLength = 0;
|
|
||||||
clearSym();
|
|
||||||
break;
|
|
||||||
./
|
|
||||||
diff --git a/src/corelib/serialization/qxmlstream.h b/src/corelib/serialization/qxmlstream.h
|
|
||||||
index 7d0aa64570..c8647e0465 100644
|
|
||||||
--- a/src/corelib/serialization/qxmlstream.h
|
|
||||||
+++ b/src/corelib/serialization/qxmlstream.h
|
|
||||||
@@ -426,6 +426,8 @@ public:
|
|
||||||
QStringRef dtdPublicId() const;
|
|
||||||
QStringRef dtdSystemId() const;
|
|
||||||
|
|
||||||
+ int entityExpansionLimit() const;
|
|
||||||
+ void setEntityExpansionLimit(int limit);
|
|
||||||
|
|
||||||
enum Error {
|
|
||||||
NoError,
|
|
||||||
diff --git a/src/corelib/serialization/qxmlstream_p.h b/src/corelib/serialization/qxmlstream_p.h
|
|
||||||
index 9c94e6d434..103b123b10 100644
|
|
||||||
--- a/src/corelib/serialization/qxmlstream_p.h
|
|
||||||
+++ b/src/corelib/serialization/qxmlstream_p.h
|
|
||||||
@@ -774,9 +774,19 @@ public:
|
|
||||||
QHash<QStringView, Entity> entityHash;
|
|
||||||
QHash<QStringView, Entity> parameterEntityHash;
|
|
||||||
QXmlStreamSimpleStack<Entity *>entityReferenceStack;
|
|
||||||
+ int entityExpansionLimit = 4096;
|
|
||||||
+ int entityLength = 0;
|
|
||||||
inline bool referenceEntity(Entity &entity) {
|
|
||||||
if (entity.isCurrentlyReferenced) {
|
|
||||||
- raiseWellFormedError(QXmlStream::tr("Recursive entity detected."));
|
|
||||||
+ raiseWellFormedError(QXmlStream::tr("Self-referencing entity detected."));
|
|
||||||
+ return false;
|
|
||||||
+ }
|
|
||||||
+ // entityLength represents the amount of additional characters the
|
|
||||||
+ // entity expands into (can be negative for e.g. &). It's used to
|
|
||||||
+ // avoid DoS attacks through recursive entity expansions
|
|
||||||
+ entityLength += entity.value.size() - entity.name.size() - 2;
|
|
||||||
+ if (entityLength > entityExpansionLimit) {
|
|
||||||
+ raiseWellFormedError(QXmlStream::tr("Entity expands to more characters than the entity expansion limit."));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
entity.isCurrentlyReferenced = true;
|
|
||||||
@@ -1308,6 +1318,8 @@ bool QXmlStreamReaderPrivate::parse()
|
|
||||||
|
|
||||||
case 10:
|
|
||||||
entityReferenceStack.pop()->isCurrentlyReferenced = false;
|
|
||||||
+ if (entityReferenceStack.isEmpty())
|
|
||||||
+ entityLength = 0;
|
|
||||||
clearSym();
|
|
||||||
break;
|
|
||||||
|
|
||||||
@ -1,31 +0,0 @@
|
|||||||
From 6256729a6da532079505edfe4c56a6ef29cd8ab8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
||||||
Date: Mon, 13 Aug 2018 15:29:16 +0200
|
|
||||||
Subject: [PATCH] Fix possible heap corruption in QXmlStream
|
|
||||||
|
|
||||||
The value of 'tos' at the check might already be on the last element,
|
|
||||||
so triggering stack expansion on the second last element is too late.
|
|
||||||
|
|
||||||
Change-Id: Ib3ab2662d4d27a71effe9e988b9e172923af2908
|
|
||||||
Reviewed-by: Richard J. Moore <rich@kde.org>
|
|
||||||
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
||||||
---
|
|
||||||
src/corelib/serialization/qxmlstream_p.h | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/corelib/serialization/qxmlstream_p.h b/src/corelib/serialization/qxmlstream_p.h
|
|
||||||
index 4157fbbd0e0..f8b1ede9439 100644
|
|
||||||
--- a/src/corelib/serialization/qxmlstream_p.h
|
|
||||||
+++ b/src/corelib/serialization/qxmlstream_p.h
|
|
||||||
@@ -1250,7 +1250,7 @@ bool QXmlStreamReaderPrivate::parse()
|
|
||||||
state_stack[tos] = 0;
|
|
||||||
return true;
|
|
||||||
} else if (act > 0) {
|
|
||||||
- if (++tos == stack_size-1)
|
|
||||||
+ if (++tos >= stack_size-1)
|
|
||||||
reallocateStack();
|
|
||||||
|
|
||||||
Value &val = sym_stack[tos];
|
|
||||||
--
|
|
||||||
2.16.3
|
|
||||||
|
|
||||||
@ -1,101 +0,0 @@
|
|||||||
From af267657ea11e292012ac02634e8bd2dcf8328c7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: wang_yue111 <648774160@qq.com>
|
|
||||||
Date: Wed, 21 Apr 2021 11:35:47 +0800
|
|
||||||
Subject: [PATCH] Fix crash when text contains too many directional chars
|
|
||||||
|
|
||||||
In case a text to be layouted contains more than 128 directional characters
|
|
||||||
it causes the application to crash
|
|
||||||
|
|
||||||
The function initScriptAnalysisAndIsolatePairs() collects information of
|
|
||||||
RTL/LTR chaaracters into vector "isolatePairs". The size of the vector is
|
|
||||||
capped to 128. Later the function generateDirectionalRuns() iterates
|
|
||||||
the text again and tries to access items from the previously capped vector
|
|
||||||
above the upper bound.
|
|
||||||
|
|
||||||
Task-number: QTBUG-77819
|
|
||||||
Change-Id: Ibb7bf12c12b1db22f43ff46236518da3fdeed26a
|
|
||||||
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
||||||
(cherry picked from commit 1232205e32464d90e871f39eb1e14fcf9b78a163)
|
|
||||||
Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
|
|
||||||
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
||||||
---
|
|
||||||
src/gui/text/qtextengine.cpp | 15 +++++++--------
|
|
||||||
.../gui/text/qtextlayout/tst_qtextlayout.cpp | 17 +++++++++++++++++
|
|
||||||
2 files changed, 24 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
|
|
||||||
index 5e38311f..0c405cbf 100644
|
|
||||||
--- a/src/gui/text/qtextengine.cpp
|
|
||||||
+++ b/src/gui/text/qtextengine.cpp
|
|
||||||
@@ -393,6 +393,7 @@ struct QBidiAlgorithm {
|
|
||||||
analysis[i].bidiDirection = (level & 1) ? QChar::DirR : QChar::DirL;
|
|
||||||
runHasContent = true;
|
|
||||||
lastRunWithContent = -1;
|
|
||||||
+ ++isolatePairPosition;
|
|
||||||
}
|
|
||||||
int runBeforeIsolate = runs.size();
|
|
||||||
ushort newLevel = isRtl ? ((stack.top().level + 1) | 1) : ((stack.top().level + 2) & ~1);
|
|
||||||
@@ -434,20 +435,18 @@ struct QBidiAlgorithm {
|
|
||||||
doEmbed(true, true, false);
|
|
||||||
break;
|
|
||||||
case QChar::DirLRI:
|
|
||||||
- ++isolatePairPosition;
|
|
||||||
- Q_ASSERT(isolatePairs.at(isolatePairPosition).start == i);
|
|
||||||
doEmbed(false, false, true);
|
|
||||||
break;
|
|
||||||
case QChar::DirRLI:
|
|
||||||
- ++isolatePairPosition;
|
|
||||||
- Q_ASSERT(isolatePairs.at(isolatePairPosition).start == i);
|
|
||||||
doEmbed(true, false, true);
|
|
||||||
break;
|
|
||||||
case QChar::DirFSI: {
|
|
||||||
- ++isolatePairPosition;
|
|
||||||
- const auto &pair = isolatePairs.at(isolatePairPosition);
|
|
||||||
- Q_ASSERT(pair.start == i);
|
|
||||||
- bool isRtl = QStringView(text + pair.start + 1, pair.end - pair.start - 1).isRightToLeft();
|
|
||||||
+ bool isRtl = false;
|
|
||||||
+ if (isolatePairPosition < isolatePairs.size()) {
|
|
||||||
+ const auto &pair = isolatePairs.at(isolatePairPosition);
|
|
||||||
+ Q_ASSERT(pair.start == i);
|
|
||||||
+ isRtl = QStringView(text + pair.start + 1, pair.end - pair.start - 1).isRightToLeft();
|
|
||||||
+ }
|
|
||||||
doEmbed(isRtl, false, true);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
diff --git a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
|
|
||||||
index 4e3d1da8..ec8b6116 100644
|
|
||||||
--- a/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
|
|
||||||
+++ b/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp
|
|
||||||
@@ -137,6 +137,7 @@ private slots:
|
|
||||||
void nbspWithFormat();
|
|
||||||
void noModificationOfInputString();
|
|
||||||
void superscriptCrash_qtbug53911();
|
|
||||||
+ void tooManyDirectionalCharctersCrash_qtbug77819();
|
|
||||||
|
|
||||||
private:
|
|
||||||
QFont testFont;
|
|
||||||
@@ -2291,5 +2292,21 @@ void tst_QTextLayout::nbspWithFormat()
|
|
||||||
QCOMPARE(layout.lineAt(1).textLength(), s2.length() + 1 + s3.length());
|
|
||||||
}
|
|
||||||
|
|
||||||
+void tst_QTextLayout::tooManyDirectionalCharctersCrash_qtbug77819()
|
|
||||||
+{
|
|
||||||
+ QString data;
|
|
||||||
+ data += QString::fromUtf8("\xe2\x81\xa8"); // U+2068 FSI character
|
|
||||||
+ data += QString::fromUtf8("\xe2\x81\xa7"); // U+2067 RLI character
|
|
||||||
+
|
|
||||||
+ // duplicating the text
|
|
||||||
+ for (int i = 0; i < 10; i++)
|
|
||||||
+ data += data;
|
|
||||||
+
|
|
||||||
+ // Nothing to test. It must not crash in beginLayout().
|
|
||||||
+ QTextLayout tl(data);
|
|
||||||
+ tl.beginLayout();
|
|
||||||
+ tl.endLayout();
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
QTEST_MAIN(tst_QTextLayout)
|
|
||||||
#include "tst_qtextlayout.moc"
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
||||||
29
qt5-qtbase-5.12.1-firebird.patch
Normal file
29
qt5-qtbase-5.12.1-firebird.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
diff -up qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/configure.json.firebird qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/configure.json
|
||||||
|
--- qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/configure.json.firebird 2019-01-28 11:11:52.000000000 -0600
|
||||||
|
+++ qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/configure.json 2019-02-03 13:41:27.392305128 -0600
|
||||||
|
@@ -49,10 +49,11 @@
|
||||||
|
"ibase": {
|
||||||
|
"label": "InterBase",
|
||||||
|
"test": {},
|
||||||
|
- "headers": "ibase.h",
|
||||||
|
+ "headers": "firebird/ibase.h",
|
||||||
|
"sources": [
|
||||||
|
{ "libs": "-lgds32_ms", "condition": "config.win32" },
|
||||||
|
- { "libs": "-lgds", "condition": "!config.win32" }
|
||||||
|
+ { "libs": "-lgds", "condition": "!config.win32" },
|
||||||
|
+ { "libs": "-lfbclient", "condition": "!config.win32" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"mysql": {
|
||||||
|
diff -up qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/ibase/qsql_ibase_p.h.firebird qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/ibase/qsql_ibase_p.h
|
||||||
|
--- qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/ibase/qsql_ibase_p.h.firebird 2019-01-28 11:11:52.000000000 -0600
|
||||||
|
+++ qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/ibase/qsql_ibase_p.h 2019-02-03 13:27:30.683142996 -0600
|
||||||
|
@@ -52,7 +52,7 @@
|
||||||
|
//
|
||||||
|
|
||||||
|
#include <QtSql/qsqldriver.h>
|
||||||
|
-#include <ibase.h>
|
||||||
|
+#include <firebird/ibase.h>
|
||||||
|
|
||||||
|
#ifdef QT_PLUGIN
|
||||||
|
#define Q_EXPORT_SQLDRIVER_IBASE
|
||||||
@ -1,32 +0,0 @@
|
|||||||
diff --git a/src/plugins/sqldrivers/configure.json b/src/plugins/sqldrivers/configure.json
|
|
||||||
index 234f880..7b13671 100644
|
|
||||||
--- a/src/plugins/sqldrivers/configure.json
|
|
||||||
+++ b/src/plugins/sqldrivers/configure.json
|
|
||||||
@@ -50,11 +50,12 @@
|
|
||||||
"ibase": {
|
|
||||||
"label": "InterBase",
|
|
||||||
"test": {
|
|
||||||
- "include": "ibase.h"
|
|
||||||
+ "include": "firebird/ibase.h"
|
|
||||||
},
|
|
||||||
"sources": [
|
|
||||||
{ "libs": "-lgds32_ms", "condition": "config.win32" },
|
|
||||||
- { "libs": "-lgds", "condition": "!config.win32" }
|
|
||||||
+ { "libs": "-lgds", "condition": "!config.win32" },
|
|
||||||
+ { "libs": "-lfbclient", "condition": "!config.win32" }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"mysql": {
|
|
||||||
diff --git a/src/plugins/sqldrivers/ibase/qsql_ibase_p.h b/src/plugins/sqldrivers/ibase/qsql_ibase_p.h
|
|
||||||
index c7cee41..6a9c56c 100644
|
|
||||||
--- a/src/plugins/sqldrivers/ibase/qsql_ibase_p.h
|
|
||||||
+++ b/src/plugins/sqldrivers/ibase/qsql_ibase_p.h
|
|
||||||
@@ -52,7 +52,7 @@
|
|
||||||
//
|
|
||||||
|
|
||||||
#include <QtSql/qsqldriver.h>
|
|
||||||
-#include <ibase.h>
|
|
||||||
+#include <firebird/ibase.h>
|
|
||||||
|
|
||||||
#ifdef QT_PLUGIN
|
|
||||||
#define Q_EXPORT_SQLDRIVER_IBASE
|
|
||||||
171
qt5-qtbase-gcc11.patch
Normal file
171
qt5-qtbase-gcc11.patch
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp
|
||||||
|
index 06fd88da..dbff3239 100644
|
||||||
|
--- a/src/corelib/codecs/qtextcodec.cpp
|
||||||
|
+++ b/src/corelib/codecs/qtextcodec.cpp
|
||||||
|
@@ -38,6 +38,7 @@
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
+#include <limits>
|
||||||
|
#include "qplatformdefs.h"
|
||||||
|
|
||||||
|
#include "qtextcodec.h"
|
||||||
|
diff --git a/src/corelib/codecs/qutfcodec.cpp b/src/corelib/codecs/qutfcodec.cpp
|
||||||
|
index 8561f908..8128d3cf 100644
|
||||||
|
--- a/src/corelib/codecs/qutfcodec.cpp
|
||||||
|
+++ b/src/corelib/codecs/qutfcodec.cpp
|
||||||
|
@@ -38,6 +38,8 @@
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
+#include <limits>
|
||||||
|
+
|
||||||
|
#include "qutfcodec_p.h"
|
||||||
|
#include "qlist.h"
|
||||||
|
#include "qendian.h"
|
||||||
|
diff --git a/src/corelib/global/qendian.cpp b/src/corelib/global/qendian.cpp
|
||||||
|
index eb08b2f8..6b41b3dd 100644
|
||||||
|
--- a/src/corelib/global/qendian.cpp
|
||||||
|
+++ b/src/corelib/global/qendian.cpp
|
||||||
|
@@ -38,6 +38,7 @@
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
+#include <limits>
|
||||||
|
#include "qendian.h"
|
||||||
|
|
||||||
|
#include "qalgorithms.h"
|
||||||
|
diff --git a/src/corelib/global/qfloat16.cpp b/src/corelib/global/qfloat16.cpp
|
||||||
|
index c9733174..c62a1972 100644
|
||||||
|
--- a/src/corelib/global/qfloat16.cpp
|
||||||
|
+++ b/src/corelib/global/qfloat16.cpp
|
||||||
|
@@ -38,6 +38,7 @@
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
+#include <limits>
|
||||||
|
#include "qfloat16.h"
|
||||||
|
#include "private/qsimd_p.h"
|
||||||
|
#include <cmath> // for fpclassify()'s return values
|
||||||
|
diff --git a/src/corelib/global/qrandom.cpp b/src/corelib/global/qrandom.cpp
|
||||||
|
index 10672c1f..6d5fd63e 100644
|
||||||
|
--- a/src/corelib/global/qrandom.cpp
|
||||||
|
+++ b/src/corelib/global/qrandom.cpp
|
||||||
|
@@ -40,6 +40,7 @@
|
||||||
|
// for rand_s
|
||||||
|
#define _CRT_RAND_S
|
||||||
|
|
||||||
|
+#include <limits>
|
||||||
|
#include "qrandom.h"
|
||||||
|
#include "qrandom_p.h"
|
||||||
|
#include <qobjectdefs.h>
|
||||||
|
diff --git a/src/corelib/plugin/qelfparser_p.cpp b/src/corelib/plugin/qelfparser_p.cpp
|
||||||
|
index 13eee353..9e7a7a41 100644
|
||||||
|
--- a/src/corelib/plugin/qelfparser_p.cpp
|
||||||
|
+++ b/src/corelib/plugin/qelfparser_p.cpp
|
||||||
|
@@ -37,6 +37,7 @@
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
+#include <limits>
|
||||||
|
#include "qelfparser_p.h"
|
||||||
|
|
||||||
|
#if defined (Q_OF_ELF) && defined(Q_CC_GNU)
|
||||||
|
diff --git a/src/corelib/plugin/qmachparser.cpp b/src/corelib/plugin/qmachparser.cpp
|
||||||
|
index 11670caf..39f5596b 100644
|
||||||
|
--- a/src/corelib/plugin/qmachparser.cpp
|
||||||
|
+++ b/src/corelib/plugin/qmachparser.cpp
|
||||||
|
@@ -37,6 +37,8 @@
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
+#include <limits>
|
||||||
|
+
|
||||||
|
#include "qmachparser_p.h"
|
||||||
|
|
||||||
|
#if defined(Q_OF_MACH_O)
|
||||||
|
diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp
|
||||||
|
index 83873edf..5aafb4e5 100644
|
||||||
|
--- a/src/corelib/plugin/quuid.cpp
|
||||||
|
+++ b/src/corelib/plugin/quuid.cpp
|
||||||
|
@@ -38,6 +38,7 @@
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
+#include <limits>
|
||||||
|
#include "quuid.h"
|
||||||
|
|
||||||
|
#include "qcryptographichash.h"
|
||||||
|
diff --git a/src/corelib/serialization/qdatastream.cpp b/src/corelib/serialization/qdatastream.cpp
|
||||||
|
index 5082a8cb..7eecfcca 100644
|
||||||
|
--- a/src/corelib/serialization/qdatastream.cpp
|
||||||
|
+++ b/src/corelib/serialization/qdatastream.cpp
|
||||||
|
@@ -40,6 +40,8 @@
|
||||||
|
#include "qdatastream.h"
|
||||||
|
#include "qdatastream_p.h"
|
||||||
|
|
||||||
|
+#include <limits>
|
||||||
|
+
|
||||||
|
#if !defined(QT_NO_DATASTREAM) || defined(QT_BOOTSTRAPPED)
|
||||||
|
#include "qbuffer.h"
|
||||||
|
#include "qfloat16.h"
|
||||||
|
diff --git a/src/corelib/text/qbytearray.cpp b/src/corelib/text/qbytearray.cpp
|
||||||
|
index 9a72df58..6651ee98 100644
|
||||||
|
--- a/src/corelib/text/qbytearray.cpp
|
||||||
|
+++ b/src/corelib/text/qbytearray.cpp
|
||||||
|
@@ -39,6 +39,7 @@
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
+#include <limits>
|
||||||
|
#include "qbytearray.h"
|
||||||
|
#include "qbytearraymatcher.h"
|
||||||
|
#include "private/qtools_p.h"
|
||||||
|
diff --git a/src/corelib/text/qbytearraymatcher.cpp b/src/corelib/text/qbytearraymatcher.cpp
|
||||||
|
index 72e09226..80511cb5 100644
|
||||||
|
--- a/src/corelib/text/qbytearraymatcher.cpp
|
||||||
|
+++ b/src/corelib/text/qbytearraymatcher.cpp
|
||||||
|
@@ -37,6 +37,7 @@
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
+#include <limits>
|
||||||
|
#include "qbytearraymatcher.h"
|
||||||
|
|
||||||
|
#include <limits.h>
|
||||||
|
diff --git a/src/corelib/tools/qbitarray.cpp b/src/corelib/tools/qbitarray.cpp
|
||||||
|
index ab3054d5..22efb3a0 100644
|
||||||
|
--- a/src/corelib/tools/qbitarray.cpp
|
||||||
|
+++ b/src/corelib/tools/qbitarray.cpp
|
||||||
|
@@ -38,6 +38,7 @@
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
+#include <limits>
|
||||||
|
#include "qbitarray.h"
|
||||||
|
#include <qalgorithms.h>
|
||||||
|
#include <qdatastream.h>
|
||||||
|
diff --git a/src/corelib/tools/qcryptographichash.cpp b/src/corelib/tools/qcryptographichash.cpp
|
||||||
|
index fa8d21e0..cd85956d 100644
|
||||||
|
--- a/src/corelib/tools/qcryptographichash.cpp
|
||||||
|
+++ b/src/corelib/tools/qcryptographichash.cpp
|
||||||
|
@@ -38,6 +38,7 @@
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
+#include <limits>
|
||||||
|
#include <qcryptographichash.h>
|
||||||
|
#include <qiodevice.h>
|
||||||
|
|
||||||
|
diff --git a/src/gui/text/qfontengine_qpf2.cpp b/src/gui/text/qfontengine_qpf2.cpp
|
||||||
|
index e00f9d05..917ab5f9 100644
|
||||||
|
--- a/src/gui/text/qfontengine_qpf2.cpp
|
||||||
|
+++ b/src/gui/text/qfontengine_qpf2.cpp
|
||||||
|
@@ -37,6 +37,7 @@
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
+#include <limits>
|
||||||
|
#include "qfontengine_qpf2_p.h"
|
||||||
|
|
||||||
|
#include <QtCore/QFile>
|
||||||
@ -1,53 +0,0 @@
|
|||||||
diff -up qtbase-everywhere-src-5.11.1/mkspecs/linux-g++/qplatformdefs.h.glibc qtbase-everywhere-src-5.11.1/mkspecs/linux-g++/qplatformdefs.h
|
|
||||||
--- qtbase-everywhere-src-5.11.1/mkspecs/linux-g++/qplatformdefs.h.glibc 2018-06-15 09:29:31.000000000 +0200
|
|
||||||
+++ qtbase-everywhere-src-5.11.1/mkspecs/linux-g++/qplatformdefs.h 2018-07-26 15:40:56.887961897 +0200
|
|
||||||
@@ -72,7 +72,9 @@
|
|
||||||
#include <sys/time.h>
|
|
||||||
#include <sys/shm.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
+#if 0
|
|
||||||
#include <sys/stat.h>
|
|
||||||
+#endif
|
|
||||||
#include <sys/wait.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
|
|
||||||
diff -up qtbase-everywhere-src-5.11.1/src/corelib/io/qfilesystemengine_unix.cpp.glibc qtbase-everywhere-src-5.11.1/src/corelib/io/qfilesystemengine_unix.cpp
|
|
||||||
--- qtbase-everywhere-src-5.11.1/src/corelib/io/qfilesystemengine_unix.cpp.glibc 2018-06-15 09:29:31.000000000 +0200
|
|
||||||
+++ qtbase-everywhere-src-5.11.1/src/corelib/io/qfilesystemengine_unix.cpp 2018-07-26 16:34:54.346840184 +0200
|
|
||||||
@@ -50,7 +50,9 @@
|
|
||||||
#include <pwd.h>
|
|
||||||
#include <stdlib.h> // for realpath()
|
|
||||||
#include <sys/types.h>
|
|
||||||
+#if 0
|
|
||||||
#include <sys/stat.h>
|
|
||||||
+#endif
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <errno.h>
|
|
||||||
@@ -91,7 +93,9 @@ extern "C" NSString *NSTemporaryDirector
|
|
||||||
# include <sys/syscall.h>
|
|
||||||
# include <sys/sendfile.h>
|
|
||||||
# include <linux/fs.h>
|
|
||||||
+#if 0
|
|
||||||
# include <linux/stat.h>
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
// in case linux/fs.h is too old and doesn't define it:
|
|
||||||
#ifndef FICLONE
|
|
||||||
@@ -105,13 +109,13 @@ extern "C" NSString *NSTemporaryDirector
|
|
||||||
# undef SYS_renameat2
|
|
||||||
# undef SYS_statx
|
|
||||||
# undef STATX_BASIC_STATS
|
|
||||||
-# else
|
|
||||||
-# if !QT_CONFIG(renameat2) && defined(SYS_renameat2)
|
|
||||||
+# else
|
|
||||||
+# if 0 && !QT_CONFIG(renameat2) && defined(SYS_renameat2)
|
|
||||||
static int renameat2(int oldfd, const char *oldpath, int newfd, const char *newpath, unsigned flags)
|
|
||||||
{ return syscall(SYS_renameat2, oldfd, oldpath, newfd, newpath, flags); }
|
|
||||||
# endif
|
|
||||||
|
|
||||||
-# if !QT_CONFIG(statx) && defined(SYS_statx)
|
|
||||||
+# if 0 && !QT_CONFIG(statx) && defined(SYS_statx)
|
|
||||||
static int statx(int dirfd, const char *pathname, int flag, unsigned mask, struct statx *statxbuf)
|
|
||||||
{ return syscall(SYS_statx, dirfd, pathname, flag, mask, statxbuf); }
|
|
||||||
# elif !QT_CONFIG(statx) && !defined(SYS_statx)
|
|
||||||
973
qt5-qtbase.spec
973
qt5-qtbase.spec
File diff suppressed because it is too large
Load Diff
11
qtbase-QTBUG-89977.patch
Normal file
11
qtbase-QTBUG-89977.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
diff -up qtbase-everywhere-src-5.15.2/src/corelib/text/qbytearray.h.foo qtbase-everywhere-src-5.15.2/src/corelib/text/qbytearray.h
|
||||||
|
--- qtbase-everywhere-src-5.15.2/src/corelib/text/qbytearray.h.foo 2020-10-27 03:02:11.000000000 -0500
|
||||||
|
+++ qtbase-everywhere-src-5.15.2/src/corelib/text/qbytearray.h 2021-02-06 17:05:04.879201352 -0600
|
||||||
|
@@ -51,6 +49,7 @@
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <iterator>
|
||||||
|
+#include <limits>
|
||||||
|
|
||||||
|
#ifdef truncate
|
||||||
|
#error qbytearray.h must be included before any header file that defines truncate
|
||||||
23
qtbase-QTBUG-90395.patch
Normal file
23
qtbase-QTBUG-90395.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
diff -up qtbase-everywhere-src-5.15.2/src/corelib/global/qendian.h.QTBUG-90395 qtbase-everywhere-src-5.15.2/src/corelib/global/qendian.h
|
||||||
|
--- qtbase-everywhere-src-5.15.2/src/corelib/global/qendian.h.QTBUG-90395 2020-10-27 03:02:11.000000000 -0500
|
||||||
|
+++ qtbase-everywhere-src-5.15.2/src/corelib/global/qendian.h 2021-02-06 16:36:27.072105717 -0600
|
||||||
|
@@ -44,6 +44,8 @@
|
||||||
|
#include <QtCore/qfloat16.h>
|
||||||
|
#include <QtCore/qglobal.h>
|
||||||
|
|
||||||
|
+#include <limits>
|
||||||
|
+
|
||||||
|
// include stdlib.h and hope that it defines __GLIBC__ for glibc-based systems
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
diff -up qtbase-everywhere-src-5.15.2/src/corelib/global/qfloat16.h.QTBUG-90395 qtbase-everywhere-src-5.15.2/src/corelib/global/qfloat16.h
|
||||||
|
--- qtbase-everywhere-src-5.15.2/src/corelib/global/qfloat16.h.QTBUG-90395 2021-02-06 16:36:27.074105730 -0600
|
||||||
|
+++ qtbase-everywhere-src-5.15.2/src/corelib/global/qfloat16.h 2021-02-06 16:37:19.212440114 -0600
|
||||||
|
@@ -43,6 +43,7 @@
|
||||||
|
|
||||||
|
#include <QtCore/qglobal.h>
|
||||||
|
#include <QtCore/qmetatype.h>
|
||||||
|
+#include <limits>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && !defined(__F16C__)
|
||||||
31
qtbase-QTBUG-91909.patch
Normal file
31
qtbase-QTBUG-91909.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From 659f7a06e91c04b239e3f4c0bcfccbe3581af1c3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sona Kurazyan <sona.kurazyan@qt.io>
|
||||||
|
Date: Wed, 17 Mar 2021 16:04:00 +0100
|
||||||
|
Subject: [PATCH] Remove the unnecessary template parameter from the class specialization
|
||||||
|
|
||||||
|
This seems to cause errors when compiling with gcc-11. Although this is
|
||||||
|
most likely a compiler bug, specifiying the template parameter type in
|
||||||
|
this case isn't necessary.
|
||||||
|
|
||||||
|
Fixes: QTBUG-91909
|
||||||
|
Fixes: QTBUG-90568
|
||||||
|
Pick-to: 6.0 6.1 5.15
|
||||||
|
Change-Id: Ib231257ccb2e16cc533f23ca5840d31e26a66d53
|
||||||
|
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
||||||
|
---
|
||||||
|
|
||||||
|
diff --git a/src/concurrent/qtconcurrentthreadengine.h b/src/concurrent/qtconcurrentthreadengine.h
|
||||||
|
index cbd8ad04..4cd5b85 100644
|
||||||
|
--- a/src/concurrent/qtconcurrentthreadengine.h
|
||||||
|
+++ b/src/concurrent/qtconcurrentthreadengine.h
|
||||||
|
@@ -256,8 +256,8 @@
|
||||||
|
class ThreadEngineStarter<void> : public ThreadEngineStarterBase<void>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
- ThreadEngineStarter<void>(ThreadEngine<void> *_threadEngine)
|
||||||
|
- :ThreadEngineStarterBase<void>(_threadEngine) {}
|
||||||
|
+ ThreadEngineStarter(ThreadEngine<void> *_threadEngine)
|
||||||
|
+ : ThreadEngineStarterBase<void>(_threadEngine) {}
|
||||||
|
|
||||||
|
void startBlocking()
|
||||||
|
{
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
diff -up qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in.foo qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in
|
||||||
|
--- qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in.foo 2019-04-30 15:18:24.886346423 -0500
|
||||||
|
+++ qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in 2019-04-30 15:19:48.303873296 -0500
|
||||||
|
@@ -66,8 +66,10 @@ unset(_GL_INCDIRS)
|
||||||
|
# Don\'t check for existence of the "_qt5gui_OPENGL_INCLUDE_DIR" because it is
|
||||||
|
# optional.
|
||||||
|
|
||||||
|
+if (NOT ${_qt5gui_OPENGL_INCLUDE_DIR} STREQUAL "/usr/include")
|
||||||
|
list(APPEND Qt5Gui_INCLUDE_DIRS ${_qt5gui_OPENGL_INCLUDE_DIR})
|
||||||
|
set_property(TARGET Qt5::Gui APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_qt5gui_OPENGL_INCLUDE_DIR})
|
||||||
|
+endif()
|
||||||
|
|
||||||
|
unset(_qt5gui_OPENGL_INCLUDE_DIR CACHE)
|
||||||
|
|
||||||
16
qtbase-everywhere-src-5.14.2-no_relocatable.patch
Normal file
16
qtbase-everywhere-src-5.14.2-no_relocatable.patch
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
diff -up qtbase-everywhere-src-5.14.2/src/corelib/global/qlibraryinfo.cpp.no_relocatable qtbase-everywhere-src-5.14.2/src/corelib/global/qlibraryinfo.cpp
|
||||||
|
--- qtbase-everywhere-src-5.14.2/src/corelib/global/qlibraryinfo.cpp.no_relocatable 2020-03-27 04:49:31.000000000 -0500
|
||||||
|
+++ qtbase-everywhere-src-5.14.2/src/corelib/global/qlibraryinfo.cpp 2020-04-13 15:13:44.075705226 -0500
|
||||||
|
@@ -671,8 +671,11 @@ static QString getPrefix(
|
||||||
|
# if QT_CONFIGURE_CROSSBUILD
|
||||||
|
if (group == QLibraryInfo::DevicePaths)
|
||||||
|
return QString::fromLocal8Bit(QT_CONFIGURE_PREFIX_PATH);
|
||||||
|
-# endif
|
||||||
|
+# elif 0 //QT_CONFIG(relocatable)
|
||||||
|
return getExtPrefixFromHostBinDir();
|
||||||
|
+# else
|
||||||
|
+ return QString::fromLocal8Bit(QT_CONFIGURE_PREFIX_PATH);
|
||||||
|
+# endif
|
||||||
|
#elif QT_CONFIG(relocatable)
|
||||||
|
return getRelocatablePrefix();
|
||||||
|
#else
|
||||||
Binary file not shown.
26
qtbase-filechooser-portal-send-window-id-in-hex.patch
Normal file
26
qtbase-filechooser-portal-send-window-id-in-hex.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
From acaabc9108dfe75530960cf8e3ec4f3602cd82e0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jan Grulich <jgrulich@redhat.com>
|
||||||
|
Date: Mon, 08 Mar 2021 12:29:21 +0100
|
||||||
|
Subject: [PATCH] FileChooser portal: send window id in hex
|
||||||
|
|
||||||
|
We send window id in decimal, however, it is expected to be send in hex.
|
||||||
|
This causes a mismatch and makes portal dialog to show in background.
|
||||||
|
|
||||||
|
Pick-to: 5.15 6.0 6.1
|
||||||
|
Change-Id: Ibd77199bbb4a2ad4782a0457ddc5506c6b5608fe
|
||||||
|
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
||||||
|
---
|
||||||
|
|
||||||
|
diff --git a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp
|
||||||
|
index ec153f6..85bdd1a 100644
|
||||||
|
--- a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp
|
||||||
|
+++ b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportalfiledialog.cpp
|
||||||
|
@@ -185,7 +185,7 @@
|
||||||
|
QLatin1String("/org/freedesktop/portal/desktop"),
|
||||||
|
QLatin1String("org.freedesktop.portal.FileChooser"),
|
||||||
|
d->saveFile ? QLatin1String("SaveFile") : QLatin1String("OpenFile"));
|
||||||
|
- QString parentWindowId = QLatin1String("x11:") + QString::number(d->winId);
|
||||||
|
+ QString parentWindowId = QLatin1String("x11:") + QString::number(d->winId, 16);
|
||||||
|
|
||||||
|
QVariantMap options;
|
||||||
|
if (!d->acceptLabel.isEmpty())
|
||||||
@ -1,13 +0,0 @@
|
|||||||
diff -up qtbase-opensource-src-5.3.2/src/xml/sax/qxml.cpp.QTBUG-35459 qtbase-opensource-src-5.3.2/src/xml/sax/qxml.cpp
|
|
||||||
diff -up qtbase-opensource-src-5.3.2/src/xml/sax/qxml_p.h.QTBUG-35459 qtbase-opensource-src-5.3.2/src/xml/sax/qxml_p.h
|
|
||||||
--- qtbase-opensource-src-5.3.2/src/xml/sax/qxml_p.h.QTBUG-35459 2014-09-11 05:48:05.000000000 -0500
|
|
||||||
+++ qtbase-opensource-src-5.3.2/src/xml/sax/qxml_p.h 2014-09-16 09:35:01.189255615 -0500
|
|
||||||
@@ -223,7 +223,7 @@ private:
|
|
||||||
// for the DTD currently being parsed.
|
|
||||||
static const int dtdRecursionLimit = 2;
|
|
||||||
// The maximum amount of characters an entity value may contain, after expansion.
|
|
||||||
- static const int entityCharacterLimit = 1024;
|
|
||||||
+ static const int entityCharacterLimit = 4096;
|
|
||||||
|
|
||||||
const QString &string();
|
|
||||||
void stringClear();
|
|
||||||
12
qtbase-opensource-src-5.9.0-mysql.patch
Normal file
12
qtbase-opensource-src-5.9.0-mysql.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -up qtbase-opensource-src-5.9.0/src/plugins/sqldrivers/mysql/qsql_mysql.cpp.than qtbase-opensource-src-5.9.0/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
|
||||||
|
diff -up qtbase-opensource-src-5.9.0/src/plugins/sqldrivers/mysql/qsql_mysql_p.h.than qtbase-opensource-src-5.9.0/src/plugins/sqldrivers/mysql/qsql_mysql_p.h
|
||||||
|
--- qtbase-opensource-src-5.9.0/src/plugins/sqldrivers/mysql/qsql_mysql_p.h.than 2017-07-14 13:43:50.831203768 +0200
|
||||||
|
+++ qtbase-opensource-src-5.9.0/src/plugins/sqldrivers/mysql/qsql_mysql_p.h 2017-07-14 13:44:24.364948006 +0200
|
||||||
|
@@ -58,6 +58,7 @@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <mysql.h>
|
||||||
|
+#include <mysql_version.h>
|
||||||
|
|
||||||
|
#ifdef QT_PLUGIN
|
||||||
|
#define Q_EXPORT_SQLDRIVER_MYSQL
|
||||||
20
qtbase-use-wayland-on-gnome.patch
Normal file
20
qtbase-use-wayland-on-gnome.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
|
||||||
|
index b8bfad4f16..676fdfad5e 100644
|
||||||
|
--- a/src/gui/kernel/qguiapplication.cpp
|
||||||
|
+++ b/src/gui/kernel/qguiapplication.cpp
|
||||||
|
@@ -1376,14 +1376,7 @@ void QGuiApplicationPrivate::createPlatformIntegration()
|
||||||
|
if (sessionType == QByteArrayLiteral("x11") && !platformName.contains(QByteArrayLiteral("xcb"))) {
|
||||||
|
platformName = QByteArrayLiteral("xcb");
|
||||||
|
} else if (sessionType == QByteArrayLiteral("wayland") && !platformName.contains(QByteArrayLiteral("wayland"))) {
|
||||||
|
- QByteArray currentDesktop = qgetenv("XDG_CURRENT_DESKTOP").toLower();
|
||||||
|
- QByteArray sessionDesktop = qgetenv("XDG_SESSION_DESKTOP").toLower();
|
||||||
|
- if (currentDesktop.contains("gnome") || sessionDesktop.contains("gnome")) {
|
||||||
|
- qInfo() << "Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome."
|
||||||
|
- << "Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.";
|
||||||
|
- } else {
|
||||||
|
- platformName = QByteArrayLiteral("wayland");
|
||||||
|
- }
|
||||||
|
+ platformName = QByteArrayLiteral("wayland");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#ifdef QT_QPA_DEFAULT_PLATFORM_NAME
|
||||||
@ -1,14 +0,0 @@
|
|||||||
diff --git a/src/3rdparty/double-conversion/include/double-conversion/utils.h b/src/3rdparty/double-conversion/include/double-conversion/utils.h
|
|
||||||
index 20bfd36..fe6cb4c 100644
|
|
||||||
--- a/src/3rdparty/double-conversion/include/double-conversion/utils.h
|
|
||||||
+++ b/src/3rdparty/double-conversion/include/double-conversion/utils.h
|
|
||||||
@@ -65,7 +65,8 @@
|
|
||||||
defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
|
|
||||||
defined(__SH4__) || defined(__alpha__) || \
|
|
||||||
defined(_MIPS_ARCH_MIPS32R2) || \
|
|
||||||
- defined(__AARCH64EL__)
|
|
||||||
+ defined(__AARCH64EL__) || \
|
|
||||||
+ defined(__riscv)
|
|
||||||
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
|
|
||||||
#elif defined(_M_IX86) || defined(__i386__) || defined(__i386)
|
|
||||||
#if defined(_WIN32)
|
|
||||||
Loading…
x
Reference in New Issue
Block a user