summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/qa/cppunit/pdfexport/PDFEncryptionTest.cxx3
-rw-r--r--vcl/source/pdf/PDFEncryptorR6.cxx2
2 files changed, 1 insertions, 4 deletions
diff --git a/vcl/qa/cppunit/pdfexport/PDFEncryptionTest.cxx b/vcl/qa/cppunit/pdfexport/PDFEncryptionTest.cxx
index ba72be283b71..e279039a4f15 100644
--- a/vcl/qa/cppunit/pdfexport/PDFEncryptionTest.cxx
+++ b/vcl/qa/cppunit/pdfexport/PDFEncryptionTest.cxx
@@ -107,8 +107,6 @@ CPPUNIT_TEST_FIXTURE(PDFEncryptionTest, testEncryptionRoundtrip_PDF_1_7)
CPPUNIT_ASSERT_EQUAL(17, nFileVersion);
}
-/* Temporary comment out to not cause more random test failures
-
CPPUNIT_TEST_FIXTURE(PDFEncryptionTest, testEncryptionRoundtrip_PDF_2_0)
{
loadFromURL(u"private:factory/swriter"_ustr);
@@ -129,7 +127,6 @@ CPPUNIT_TEST_FIXTURE(PDFEncryptionTest, testEncryptionRoundtrip_PDF_2_0)
int nFileVersion = pPdfDocument->getFileVersion();
CPPUNIT_ASSERT_EQUAL(20, nFileVersion);
}
-*/
CPPUNIT_TEST_FIXTURE(PDFEncryptionTest, testComputeHashForR6)
{
diff --git a/vcl/source/pdf/PDFEncryptorR6.cxx b/vcl/source/pdf/PDFEncryptorR6.cxx
index 52dceddc9636..6363ace090a8 100644
--- a/vcl/source/pdf/PDFEncryptorR6.cxx
+++ b/vcl/source/pdf/PDFEncryptorR6.cxx
@@ -235,7 +235,7 @@ std::vector<sal_uInt8> computeHashR6(const sal_uInt8* pPassword, size_t nPasswor
}
// Step e) and f)
// We stop iteration if we do at least 64 rounds and (the last element of E <= round number - 32)
- while (nRound < 64 || E.back() > (nRound - 32));
+ while (nRound <= 64 || E.back() > (nRound - 32));
// Output - first 32 bytes
return std::vector<sal_uInt8>(K.begin(), K.begin() + 32);