fix build with GCC 14
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Fri, 25 Oct 2024 09:39:48 +0000 (12:39 +0300)
committerDmitry Shachnev <mitya57@debian.org>
Fri, 25 Oct 2024 09:39:48 +0000 (12:39 +0300)
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

index 9e726d5fe10c528bb2601d8ab7185ff844f21993..989a59a6122f01be7b9bf7ff4a0bc3ef522f9979 100644 (file)
@@ -231,8 +231,9 @@ bool isAllowedByAllWithHashFromContent(const CSPDirectiveListVector& policies, c
         auto cryptoDigest = CryptoDigest::create(toCryptoDigestAlgorithm(algorithm));
         cryptoDigest->addBytes(contentCString.data(), contentCString.length());
         Vector<uint8_t> 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;
         }
     }