From 17cc62f2aa0e5c35b456e9a59c65fe8dd76ab6f3 Mon Sep 17 00:00:00 2001 From: Debian Qt/KDE Maintainers Date: Thu, 9 Jan 2025 14:39:01 +0300 Subject: [PATCH] fix build with GCC 14 Origin: Fedora, https://src.fedoraproject.org/rpms/qt5-qtwebkit/blob/rawhide/f/qtwebkit-fix-build-gcc14.patch Forwarded: no Last-Update: 2024-07-04 Gbp-Pq: Name gcc_14.diff --- Source/WebCore/page/csp/ContentSecurityPolicy.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/WebCore/page/csp/ContentSecurityPolicy.cpp b/Source/WebCore/page/csp/ContentSecurityPolicy.cpp index 9e726d5f..989a59a6 100644 --- a/Source/WebCore/page/csp/ContentSecurityPolicy.cpp +++ b/Source/WebCore/page/csp/ContentSecurityPolicy.cpp @@ -231,8 +231,9 @@ bool isAllowedByAllWithHashFromContent(const CSPDirectiveListVector& policies, c auto cryptoDigest = CryptoDigest::create(toCryptoDigestAlgorithm(algorithm)); cryptoDigest->addBytes(contentCString.data(), contentCString.length()); Vector digest = cryptoDigest->computeHash(); + ContentSecurityPolicyHash hash = std::make_pair(algorithm, digest); for (auto& policy : policies) { - if ((policy.get()->*allowed)(std::make_pair(algorithm, digest))) + if ((policy.get()->*allowed)(hash)) return true; } } -- 2.30.2