Boost C++ Libraries: Ticket #2882: infinite loop when attempting to close a filtered_stream<output> with a zlib_decompressor when extra data is appended to the stream https://svn.boost.org/trac10/ticket/2882 <p> I ran into this while attempting to port over some code from using zlib directly. Apparently one of the compressed file formats contains a 4 byte length at the end of the zlib data. This causes zlib to return Z_STREAM_END with 4 bytes still left to write. This in turn causes an infinite loop in boost::iostreams::symmetric_filter::write, do to the fact that the return value of filter().filter is not checked. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2882 Trac 1.4.3 Jeremy Drake <boost@…> Mon, 23 Mar 2009 21:41:33 GMT attachment set https://svn.boost.org/trac10/ticket/2882 https://svn.boost.org/trac10/ticket/2882 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">symmetric_filter_output_infinite_loop.cpp</span> </li> </ul> <p> minimal program to reproduce </p> Ticket Jeremy Drake <boost@…> Mon, 23 Mar 2009 21:43:28 GMT attachment set https://svn.boost.org/trac10/ticket/2882 https://svn.boost.org/trac10/ticket/2882 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">symmetric_filter_output_infinite_loop.patch</span> </li> </ul> <p> patch which seems to fix the issue </p> Ticket Jeremy Drake <boost@…> Mon, 23 Mar 2009 21:46:30 GMT attachment set https://svn.boost.org/trac10/ticket/2882 https://svn.boost.org/trac10/ticket/2882 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">symmetric_filter_output_infinite_loop.2.patch</span> </li> </ul> <p> patch which seems to fix the issue (removed CRs, hopefully it will show up right now) </p> Ticket Jonathan Turkanis Tue, 24 Mar 2009 03:47:10 GMT status changed https://svn.boost.org/trac10/ticket/2882#comment:1 https://svn.boost.org/trac10/ticket/2882#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket Steven Watanabe Thu, 17 Jun 2010 01:47:19 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/2882#comment:2 https://svn.boost.org/trac10/ticket/2882#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> This was fixed in the trunk as a side effect of <a class="changeset" href="https://svn.boost.org/trac10/changeset/63031" title="Make gzip_decompressor a DualUseFilter. Fixes #1579.">[63031]</a>. </p> Ticket