Opened 14 years ago
Closed 12 years ago
#2882 closed Bugs (fixed)
infinite loop when attempting to close a filtered_stream<output> with a zlib_decompressor when extra data is appended to the stream
Reported by: | Owned by: | Jonathan Turkanis | |
---|---|---|---|
Milestone: | Boost 1.39.0 | Component: | iostreams |
Version: | Boost 1.38.0 | Severity: | Problem |
Keywords: | Cc: |
Description
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.
Attachments (3)
Change History (5)
by , 14 years ago
Attachment: | symmetric_filter_output_infinite_loop.cpp added |
---|
by , 14 years ago
Attachment: | symmetric_filter_output_infinite_loop.patch added |
---|
patch which seems to fix the issue
by , 14 years ago
Attachment: | symmetric_filter_output_infinite_loop.2.patch added |
---|
patch which seems to fix the issue (removed CRs, hopefully it will show up right now)
comment:1 by , 14 years ago
Status: | new → assigned |
---|
comment:2 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
This was fixed in the trunk as a side effect of [63031].
minimal program to reproduce