From 8d8b9b80b114b94b20b0bf1438d80e925b49e3bf Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 23 Jun 2016 11:24:55 +0200 Subject: 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 --- package/inc/ZipOutputStream.hxx | 1 + 1 file changed, 1 insertion(+) (limited to 'package/inc') 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( -- cgit