summaryrefslogtreecommitdiff
path: root/src/network/ssl/qsslcertificate.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-08-24 11:33:34 +0200
committerThiago Macieira <thiago.macieira@nokia.com>2009-08-28 11:07:37 +0200
commit802d8c02eaa0aa9cd8d0c6cbd18cd814e6337bc6 (patch)
treee69c095056836dccbbf8138934614da542a8a003 /src/network/ssl/qsslcertificate.cpp
parenta3ddaf7eeead265d4a22bf9ae6508509d175cfd2 (diff)
downloadqt4-tools-802d8c02eaa0aa9cd8d0c6cbd18cd814e6337bc6.tar.gz
Fix parsing of Subject Alternate Names in Qt.
Simple misuse of QLatin1String. Use QString::fromLatin1 instead and avoid the QByteArray temporary. Reviewed-by: Andreas Aardal Hanssen Tracking: CVE-2009-2700
Diffstat (limited to 'src/network/ssl/qsslcertificate.cpp')
-rw-r--r--src/network/ssl/qsslcertificate.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp
index d62c9112e3..b5df35ce35 100644
--- a/src/network/ssl/qsslcertificate.cpp
+++ b/src/network/ssl/qsslcertificate.cpp
@@ -377,7 +377,7 @@ QMultiMap<QSsl::AlternateNameEntryType, QString> QSslCertificate::alternateSubje
}
const char *altNameStr = reinterpret_cast<const char *>(q_ASN1_STRING_data(genName->d.ia5));
- const QString altName = QLatin1String(QByteArray(altNameStr, len));
+ const QString altName = QString::fromLatin1(altNameStr, len);
if (genName->type == GEN_DNS)
result.insert(QSsl::DnsEntry, altName);
else if (genName->type == GEN_EMAIL)