summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorIevgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>2021-08-09 19:10:00 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-08-16 21:27:11 +0000
commite4c90e81fe1cd34bd28bd4b21e4b8461e83e8525 (patch)
tree15657ed3fe64670213a37ed5d74e6bf688766f5f /tests
parentb4a1265b151d4008c9edafbcc2892f49abb6fe4a (diff)
QUrl: Improve Punycode overflow handling
Add more overflow checks from the sample code in RFC 3492. Also check if a code point to be inserted into output is in the allowable range for Unicode. Rewrite all overflow checks to use {add,mul}_overflow() functions. Do not try to process any inputs that are too long to be part of a valid domain name label. This fixes a test in tst_qurlinternal. Fixes: QTBUG-95689 Change-Id: Ice0b3cd640d8a688b63a791192ef2fa2f13444be Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit fe9ddbe197d6ce4ff2634415c621c8fd9fe5810a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp b/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp
index 1de7c648d7..0c22235034 100644
--- a/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp
+++ b/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp
@@ -703,8 +703,6 @@ void tst_QUrlInternal::ace_testsuite()
QString domain = in + suffix;
QCOMPARE(QString::fromLatin1(QUrl::toAce(domain)), toace + suffix);
- QEXPECT_FAIL("punycode-overflow-2", "QTBUG-95689: Missing oweflow check in punycode decoder",
- Abort);
if (fromace != ".")
QCOMPARE(QUrl::fromAce(domain.toLatin1()), fromace + suffix);
QCOMPARE(QUrl::fromAce(QUrl::toAce(domain)), unicode + suffix);