summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-05-08 16:36:26 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-05-08 21:48:14 (GMT)
commit75f0c1f0f0496ae22ed89b996dfb0050defd0f3e (patch)
treedcd8e9f5e83b6ae3d51ba821df0e36037b6256c1 /src/corelib
parent79533291672fd5e6ddafe5be90501cbe2ec97b1b (diff)
downloadQt-75f0c1f0f0496ae22ed89b996dfb0050defd0f3e.zip
Qt-75f0c1f0f0496ae22ed89b996dfb0050defd0f3e.tar.gz
Qt-75f0c1f0f0496ae22ed89b996dfb0050defd0f3e.tar.bz2
QUrl: fix parsing of IRIs with more than one IDN label
Task-number: QTBUG-10511 Reviewed-by: Trust Me
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qurl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index 3604648..bdb0cfd 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -3308,6 +3308,7 @@ static QString qt_ACE_do(const QString &domain, AceOperation op)
qt_nameprep(&result, prevLen);
labelLength = result.length() - prevLen;
register int toReserve = labelLength + 4 + 6; // "xn--" plus some extra bytes
+ aceForm.resize(0);
if (toReserve > aceForm.capacity())
aceForm.reserve(toReserve);
toPunycodeHelper(result.constData() + prevLen, result.size() - prevLen, &aceForm);