QCryptographicHash[OpenSSL]: do not resize result when adding data

This is unnecessary and basically doesn't have any effect.

Pick-to: 6.5
Change-Id: I6b63e989c43bdcd55bf83d2c0756da2de1ab49df
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
Jan Grulich 2023-01-11 12:19:18 +01:00
parent 8fccba0e63
commit a647d18df2

View File

@ -616,7 +616,6 @@ void QCryptographicHashPrivate::addData(QByteArrayView bytes) noexcept
method == QCryptographicHash::Blake2s_224) {
blake2s_update(&blake2sContext, reinterpret_cast<const uint8_t *>(data), length);
} else if (!initializationFailed) {
result.resizeForOverwrite(EVP_MD_get_size(algorithm.get()));
const int ret = EVP_DigestUpdate(context.get(), (const unsigned char *)data, length);
Q_UNUSED(ret);
}