parent
d86b3c49e1
commit
09350532ee
@ -1,61 +0,0 @@
|
|||||||
From 599722cf77310429a9b9bd2a348486a08b60de0d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Miklos Vajna <vmiklos@collabora.com>
|
|
||||||
Date: Mon, 13 Mar 2023 20:04:17 +0100
|
|
||||||
Subject: svl: fix CppunitTest_desktop_lib's
|
|
||||||
DesktopLOKTest::testSignDocument_PEM_PDF
|
|
||||||
|
|
||||||
The problem was that this test passed when the entire suite was running,
|
|
||||||
but not as an individual test.
|
|
||||||
|
|
||||||
Digging deeper, this didn't pass in isolation because the test loads a
|
|
||||||
private key into memory (which is not in the NSS DB) and since commit
|
|
||||||
5592ee094ca9f09bfcc16537d931518d4e6b2231 (svl: fix
|
|
||||||
testSignDocument_PEM_PDF with "dbm:" NSS DB, 2022-04-28) we delete that
|
|
||||||
in-memory key as a workaround for the NSS dbm -> sqlite transition.
|
|
||||||
|
|
||||||
Fix the problem by not deleting the in-memory private key in the LOK
|
|
||||||
case: this makes the test (operating in a stateless mode, with in-memory
|
|
||||||
keys) pass again and keeps the desktop signing (working with the NSS DB)
|
|
||||||
working.
|
|
||||||
|
|
||||||
I noticed this test failure as a local test update of libxmlsec to 1.3
|
|
||||||
RC started to fail here even when the whole suite was running, but looks
|
|
||||||
like this was working by accident before anyway, and the fix doesn't
|
|
||||||
hurt for libxmlsec 1.2, either.
|
|
||||||
|
|
||||||
Change-Id: Id365ddc5c5d04d538609f444c0e3c4ab4b32a6fd
|
|
||||||
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148817
|
|
||||||
Tested-by: Jenkins
|
|
||||||
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
||||||
---
|
|
||||||
svl/source/crypto/cryptosign.cxx | 7 ++++++-
|
|
||||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/svl/source/crypto/cryptosign.cxx b/svl/source/crypto/cryptosign.cxx
|
|
||||||
index 1d6337845569..e68ccb8aafda 100644
|
|
||||||
--- a/svl/source/crypto/cryptosign.cxx
|
|
||||||
+++ b/svl/source/crypto/cryptosign.cxx
|
|
||||||
@@ -26,6 +26,7 @@
|
|
||||||
#include <comphelper/processfactory.hxx>
|
|
||||||
#include <comphelper/random.hxx>
|
|
||||||
#include <comphelper/scopeguard.hxx>
|
|
||||||
+#include <comphelper/lok.hxx>
|
|
||||||
#include <com/sun/star/security/XCertificate.hpp>
|
|
||||||
#include <com/sun/star/uno/Sequence.hxx>
|
|
||||||
#include <o3tl/char16_t2wchar_t.hxx>
|
|
||||||
@@ -640,7 +641,11 @@ NSSCMSMessage *CreateCMSMessage(const PRTime* time,
|
|
||||||
// if it works, and fallback if it doesn't.
|
|
||||||
if (SECKEYPrivateKey * pPrivateKey = PK11_FindKeyByAnyCert(cert, nullptr))
|
|
||||||
{
|
|
||||||
- SECKEY_DestroyPrivateKey(pPrivateKey);
|
|
||||||
+ if (!comphelper::LibreOfficeKit::isActive())
|
|
||||||
+ {
|
|
||||||
+ // pPrivateKey only exists in the memory in the LOK case, don't delete it.
|
|
||||||
+ SECKEY_DestroyPrivateKey(pPrivateKey);
|
|
||||||
+ }
|
|
||||||
*cms_signer = NSS_CMSSignerInfo_Create(result, cert, SEC_OID_SHA256);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
--
|
|
||||||
cgit v1.2.1
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
|||||||
From d362de6dee0949704c917d65d06d2bf1bc0892c1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
|
||||||
Date: Thu, 26 Jan 2023 09:59:47 +0000
|
|
||||||
Subject: [PATCH] include filename if the test fails
|
|
||||||
|
|
||||||
which it does for me with fedora 38 s390x
|
|
||||||
|
|
||||||
Change-Id: I32ad30061717287e785a395afc893db1a5764bcd
|
|
||||||
---
|
|
||||||
sw/qa/core/macros-test.cxx | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx
|
|
||||||
index 72ed9b5a9612..a8c76bef1883 100644
|
|
||||||
--- a/sw/qa/core/macros-test.cxx
|
|
||||||
+++ b/sw/qa/core/macros-test.cxx
|
|
||||||
@@ -142,7 +142,7 @@ void SwMacrosTest::testVba()
|
|
||||||
|
|
||||||
uno::Any aRet = executeMacro(testInfo[i].sMacroUrl);
|
|
||||||
OUString aStringRes;
|
|
||||||
- CPPUNIT_ASSERT(aRet >>= aStringRes);
|
|
||||||
+ CPPUNIT_ASSERT_MESSAGE(sFileName.toUtf8().getStr(), aRet >>= aStringRes);
|
|
||||||
CPPUNIT_ASSERT_EQUAL(OUString("OK"), aStringRes);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.39.1
|
|
||||||
|
|
@ -0,0 +1,50 @@
|
|||||||
|
From 694bacca057c9f1d93ab27d61199aec9d060b868 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tibor Nagy <nagy.tibor2@nisz.hu>
|
||||||
|
Date: Fri, 4 Aug 2023 00:39:24 +0200
|
||||||
|
Subject: [PATCH] Fix heap-use-after-free
|
||||||
|
|
||||||
|
The issue is caused by commit Ic87983fa6e3279a64841babc565fbe97710ff730
|
||||||
|
(tdf#99808 sc: fix background of conditional formatting in merged cell)
|
||||||
|
|
||||||
|
Change-Id: Ic72ba16c2649537dc3b486e07c12e2486cdf1957
|
||||||
|
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155328
|
||||||
|
Tested-by: Jenkins
|
||||||
|
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
||||||
|
---
|
||||||
|
sc/qa/unit/ucalc_condformat.cxx | 12 +++++-------
|
||||||
|
1 file changed, 5 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/sc/qa/unit/ucalc_condformat.cxx b/sc/qa/unit/ucalc_condformat.cxx
|
||||||
|
index 6b79a4318501..7a0abc7cf026 100644
|
||||||
|
--- a/sc/qa/unit/ucalc_condformat.cxx
|
||||||
|
+++ b/sc/qa/unit/ucalc_condformat.cxx
|
||||||
|
@@ -1394,21 +1394,19 @@ CPPUNIT_TEST_FIXTURE(TestCondformat, testConditionStyleInMergedCell)
|
||||||
|
// Add a conditional format.
|
||||||
|
auto pFormat = std::make_unique<ScConditionalFormat>(1, m_pDoc);
|
||||||
|
pFormat->SetRange(ScRange(0, 0, 0, 0, 0, 0));
|
||||||
|
- auto pFormatTmp = pFormat.get();
|
||||||
|
- sal_uLong nKey = m_pDoc->AddCondFormat(std::move(pFormat), 0);
|
||||||
|
|
||||||
|
// Add condition in which if the value equals 1, set the "Good" style.
|
||||||
|
ScCondFormatEntry* pEntry = new ScCondFormatEntry(
|
||||||
|
ScConditionMode::Equal, "=1", "", *m_pDoc, ScAddress(0, 0, 0), ScResId(STR_STYLENAME_GOOD));
|
||||||
|
- pFormatTmp->AddEntry(pEntry);
|
||||||
|
+ pFormat->AddEntry(pEntry);
|
||||||
|
|
||||||
|
// Apply the format to the range.
|
||||||
|
- m_pDoc->AddCondFormatData(pFormatTmp->GetRange(), 0, nKey);
|
||||||
|
+ m_pDoc->AddCondFormatData(pFormat->GetRange(), 0, 1);
|
||||||
|
|
||||||
|
ScDocFunc& rFunc = m_xDocShell->GetDocFunc();
|
||||||
|
- sal_uInt32 nOldFormat = pFormatTmp->GetKey();
|
||||||
|
- const ScRangeList& rRangeList = pFormatTmp->GetRange();
|
||||||
|
- rFunc.ReplaceConditionalFormat(nOldFormat, pFormatTmp->Clone(), 0, rRangeList);
|
||||||
|
+ sal_uInt32 nOldFormat = pFormat->GetKey();
|
||||||
|
+ const ScRangeList& rRangeList = pFormat->GetRange();
|
||||||
|
+ rFunc.ReplaceConditionalFormat(nOldFormat, std::move(pFormat), 0, rRangeList);
|
||||||
|
|
||||||
|
CPPUNIT_ASSERT_EQUAL(true, aListener.mbPaintAllMergedCell);
|
||||||
|
|
||||||
|
--
|
||||||
|
2.41.0
|
||||||
|
|
Loading…
Reference in new issue