QTlsBackendOpenSSL: don't allocate memory for a QString appendee
Use the QLatin1String overload of QString::append(). Pick-to: 6.3 Change-Id: Id8ddfd72199cfb627c2d6648ce3011979f92094e Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
This commit is contained in:
parent
21e0cb7a42
commit
7fa17b5f79
@ -72,7 +72,7 @@ QString QTlsBackendOpenSSL::getErrorsFromOpenSsl()
|
|||||||
if (!errorString.isEmpty())
|
if (!errorString.isEmpty())
|
||||||
errorString.append(", "_L1);
|
errorString.append(", "_L1);
|
||||||
q_ERR_error_string_n(errNum, buf, sizeof buf);
|
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(QLatin1StringView(buf)); // error is ascii according to man ERR_error_string
|
||||||
}
|
}
|
||||||
return errorString;
|
return errorString;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user