From 042c1b94d0d587cd60f5ae81885c412665bde644 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 17 May 2022 15:58:00 +0200 Subject: [PATCH] QTlsBackendOpenSSL: don't allocate memory for a QString appendee Use the QLatin1String overload of QString::append(). Manual conflict resolutions: - ported from 6.4's QLatin1StringView to 6.3's QLatin1String Change-Id: Id8ddfd72199cfb627c2d6648ce3011979f92094e Reviewed-by: Sona Kurazyan (cherry picked from commit 7fa17b5f7998926c8f8650694a977eb7a24ae191) --- src/plugins/tls/openssl/qtlsbackend_openssl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/tls/openssl/qtlsbackend_openssl.cpp b/src/plugins/tls/openssl/qtlsbackend_openssl.cpp index 64f939f65df..19bd48a9c3b 100644 --- a/src/plugins/tls/openssl/qtlsbackend_openssl.cpp +++ b/src/plugins/tls/openssl/qtlsbackend_openssl.cpp @@ -105,7 +105,7 @@ QString QTlsBackendOpenSSL::getErrorsFromOpenSsl() if (!errorString.isEmpty()) errorString.append(QLatin1String(", ")); q_ERR_error_string_n(errNum, buf, sizeof buf); - errorString.append(QString::fromLatin1(buf)); // error is ascii according to man ERR_error_string + errorString.append(QLatin1String(buf)); // error is ascii according to man ERR_error_string } return errorString; }