diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-08-24 09:33:34 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-08-28 09:07:37 (GMT) |
commit | 802d8c02eaa0aa9cd8d0c6cbd18cd814e6337bc6 (patch) | |
tree | e69c095056836dccbbf8138934614da542a8a003 /src | |
parent | a3ddaf7eeead265d4a22bf9ae6508509d175cfd2 (diff) | |
download | Qt-802d8c02eaa0aa9cd8d0c6cbd18cd814e6337bc6.zip Qt-802d8c02eaa0aa9cd8d0c6cbd18cd814e6337bc6.tar.gz Qt-802d8c02eaa0aa9cd8d0c6cbd18cd814e6337bc6.tar.bz2 |
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')
-rw-r--r-- | src/network/ssl/qsslcertificate.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp index d62c911..b5df35c 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) |