diff options
author | Mohammed Abdul Azeem <azeemmysore@gmail.com> | 2017-07-19 00:34:43 +0530 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2017-07-19 13:49:04 +0200 |
commit | def6f7f749dd0a175427e51d8620b1406084d553 (patch) | |
tree | b2b1d03646f4be52e8e2cfdadde181eaa3466582 /package/inc | |
parent | Separate SvxMenuConfigPage from cfg.cxx (diff) | |
download | core-def6f7f749dd0a175427e51d8620b1406084d553.tar.gz core-def6f7f749dd0a175427e51d8620b1406084d553.zip |
tdf#108835 Fixed writer crash on adding Autocorrect Entry:
ZipPackageStream::saveChild seeks and reads on the same
stream, so it cannot be done parallely. Also, read on
BufferedStream tries to aquire the same mutes, which is
already aquired by the calling method resulting in
deadlock. Using UnbufferedStream here should solve both.
Change-Id: I25b7ca2ff3c31125cf107fe404f9af66435bec7d
Reviewed-on: https://gerrit.libreoffice.org/40160
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'package/inc')
-rw-r--r-- | package/inc/ZipFile.hxx | 4 | ||||
-rw-r--r-- | package/inc/ZipPackageStream.hxx | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/package/inc/ZipFile.hxx b/package/inc/ZipFile.hxx index 1ca47f43b19c..021493d64459 100644 --- a/package/inc/ZipFile.hxx +++ b/package/inc/ZipFile.hxx @@ -71,6 +71,7 @@ class ZipFile const ::rtl::Reference < EncryptionData > &rData, sal_Int8 nStreamMode, bool bDecrypt, + const bool bUseBufferedStream = true, const OUString& aMediaType = OUString() ); bool hasValidPassword ( ZipEntry & rEntry, const rtl::Reference < EncryptionData > &rData ); @@ -108,7 +109,8 @@ public: ZipEntry& rEntry, const ::rtl::Reference < EncryptionData > &rData, bool bDecrypt, - const rtl::Reference<comphelper::RefCountedMutex>& aMutexHolder ); + const rtl::Reference<comphelper::RefCountedMutex>& aMutexHolder, + const bool bUseBufferedStream = true ); static css::uno::Reference< css::xml::crypto::XDigestContext > StaticGetDigestContextForChecksum( const css::uno::Reference< css::uno::XComponentContext >& xArgContext, diff --git a/package/inc/ZipPackageStream.hxx b/package/inc/ZipPackageStream.hxx index 5930e300898b..228b5c08618d 100644 --- a/package/inc/ZipPackageStream.hxx +++ b/package/inc/ZipPackageStream.hxx @@ -74,7 +74,7 @@ private: /// Check that m_xStream implements io::XSeekable and return it css::uno::Reference< css::io::XInputStream > const & GetOwnSeekStream(); /// @throws css::uno::RuntimeException - css::uno::Reference< css::io::XInputStream > SAL_CALL getRawData(); + css::uno::Reference< css::io::XInputStream > SAL_CALL getRawData( const bool bUseBufferedStream = true ); public: bool IsPackageMember () const { return m_nStreamMode == PACKAGE_STREAM_PACKAGEMEMBER;} |