summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/io/qurlidna.cpp2
-rw-r--r--tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/corelib/io/qurlidna.cpp b/src/corelib/io/qurlidna.cpp
index b41ad9033d..5fa4b5f7a1 100644
--- a/src/corelib/io/qurlidna.cpp
+++ b/src/corelib/io/qurlidna.cpp
@@ -2029,7 +2029,7 @@ Q_AUTOTEST_EXPORT void qt_nameprep(QString *source, int from)
for ( ; out < e; ++out) {
register ushort uc = out->unicode();
- if (uc > 0x80) {
+ if (uc >= 0x80) {
break;
} else if (uc >= 'A' && uc <= 'Z') {
*out = QChar(uc | 0x20);
diff --git a/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp b/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp
index d60e1b6647..2014045171 100644
--- a/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp
+++ b/tests/auto/corelib/io/qurlinternal/tst_qurlinternal.cpp
@@ -375,6 +375,11 @@ void tst_QUrlInternal::nameprep_testsuite_data()
<< QString::fromUtf8("\x10\x7F")
<< QString() << 0 << 0;
+ QTest::newRow("Non-ASCII 8bit control character U+0080")
+ << QString::fromUtf8("x\xC2\x80x")
+ << QString()
+ << QString("Nameprep") << 0 << STRINGPREP_CONTAINS_PROHIBITED;
+
QTest::newRow("Non-ASCII 8bit control character U+0085")
<< QString::fromUtf8("x\xC2\x85x")
<< QString()