From 1fe74c3bd3f727551b8168ee9f3e642d42233d55 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Wed, 14 Dec 2022 08:35:56 +0100 Subject: [PATCH] QCryptographicHash: clear the result in QCH::reset() when using OpenSSL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OpenSSL implementation did not clear the previous result when calling QCH::reset(). This could lead to not generating new hashes. Pick-to: 6.5 Change-Id: Ic83e6382038a2f8808af950b88e57316b90ef2bc Reviewed-by: MÃ¥rten Nordheim --- src/corelib/tools/qcryptographichash.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qcryptographichash.cpp b/src/corelib/tools/qcryptographichash.cpp index 7ccafaeb36e..6044665d28f 100644 --- a/src/corelib/tools/qcryptographichash.cpp +++ b/src/corelib/tools/qcryptographichash.cpp @@ -560,8 +560,8 @@ void QCryptographicHashPrivate::reset() noexcept break; #endif } - result.clear(); #endif // !QT_CONFIG(opensslv30) + result.clear(); } #if QT_DEPRECATED_SINCE(6, 4)