[Libreoffice-commits] core.git: package/source
Thorsten Behrens
Thorsten.Behrens at CIB.de
Sat Jan 13 13:35:41 UTC 2018
package/source/zipapi/XUnbufferedStream.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 6df0c7bc230a424f5aefe583b591df70c6273b6f
Author: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Date: Thu Jan 11 23:38:35 2018 +0100
tdf#114550 recognize sym key & init vec as valid f/ decrypt
Otherwise package code would _only_ try to decrypt for salt and
iteration count present, which does not make sense for gpg.
Change-Id: Ie366f086a3c14d6b54b91b4edee8cfef1a42c44b
Reviewed-on: https://gerrit.libreoffice.org/47782
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/package/source/zipapi/XUnbufferedStream.cxx b/package/source/zipapi/XUnbufferedStream.cxx
index 162bab6d7580..d20b46195c3a 100644
--- a/package/source/zipapi/XUnbufferedStream.cxx
+++ b/package/source/zipapi/XUnbufferedStream.cxx
@@ -78,7 +78,10 @@ XUnbufferedStream::XUnbufferedStream(
if (mnZipSize < 0)
throw ZipIOException("The stream seems to be broken!");
- bool bHaveEncryptData = rData.is() && rData->m_aSalt.getLength() && rData->m_aInitVector.getLength() && rData->m_nIterationCount != 0;
+ bool bHaveEncryptData = rData.is() && rData->m_aInitVector.getLength() &&
+ ((rData->m_aSalt.getLength() && rData->m_nIterationCount != 0)
+ ||
+ rData->m_aKey.getLength());
bool bMustDecrypt = nStreamMode == UNBUFF_STREAM_DATA && bHaveEncryptData && bIsEncrypted;
if ( bMustDecrypt )
More information about the Libreoffice-commits
mailing list