From: Debian Qt/KDE Maintainers Date: Fri, 25 Oct 2024 09:39:48 +0000 (+0300) Subject: fix build with GCC 14 X-Git-Tag: archive/raspbian/5.212.0_alpha4-42+rpi1^2^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e9b63d6230b63f65753678fb76dc23a960451467;p=qtwebkit-opensource-src.git 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 --- 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; } }