diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-06-23 11:24:55 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-06-23 11:40:35 +0200 |
commit | 8d8b9b80b114b94b20b0bf1438d80e925b49e3bf (patch) | |
tree | a7cd922f6c5b94138934e8687a2c5f41a7d37185 /package/inc/ZipOutputStream.hxx | |
parent | cd292ba17c62a90f3530326f7fc87036da16a353 (diff) |
package: fix exception handling in DeflateThread (related tdf#91807)
In the bugdoc of tdf#91807 there are at least 49 corrupt zip streams
that raise exceptions in the DeflateThreads. Because the maximum
allowed number of threads happens to be 48, this results in an infinite
loop in ZipOutputStream::reduceScheduledThreadsToGivenNumberOrLess().
(regression from 7e2ea27e5d56f5cf767a6718a0f5edc28e24af14)
In case an exception is thrown, don't re-throw it immediately, which
might cause trouble such as leaking all of the ZipOutputEntry instances
in m_aEntries.
Change-Id: Ia74ab8e46fa1349c049d05dbec3454bfbe7d61d9
Diffstat (limited to 'package/inc/ZipOutputStream.hxx')
-rw-r--r-- | package/inc/ZipOutputStream.hxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/package/inc/ZipOutputStream.hxx b/package/inc/ZipOutputStream.hxx index 26d7715c05b9..136bc72b249d 100644 --- a/package/inc/ZipOutputStream.hxx +++ b/package/inc/ZipOutputStream.hxx @@ -40,6 +40,7 @@ class ZipOutputStream ZipEntry *m_pCurrentEntry; comphelper::ThreadPool &m_rSharedThreadPool; std::vector< ZipOutputEntry* > m_aEntries; + ::css::uno::Any m_aDeflateException; public: ZipOutputStream( |