[Patches] [Patch #103373] zlib sync-flush fix

noreply@sourceforge.net noreply@sourceforge.net
Sat, 17 Feb 2001 01:55:20 -0800


Patch #103373 has been updated. 

Project: python
Category: Modules
Status: Open
Submitted by: abo
Assigned to : akuchling
Summary: zlib sync-flush fix

Follow-Ups:

Date: 2001-Feb-17 01:55
By: abo

Comment:
There is an example program that triggers the main "sync-flush" bug
attached to the bug report (I forget the id, but its fairly clearly labled
in bug-tracking).

As for the others, it's quite hard to actualy trigger some of these, and
some of them are violations of the zlib interface that may or may not
actualy cause problems with the current version of zlib. I'll go through
them in detail now;

Avoid repeat calls to (in|de)flateEnd: possably causes no problems with
current version of zlib, but might in future releases. I haven't tested it,
but if you really want I could whip something up that tests it.

Raises exception when allocating unused_data fails, fixes memory leak when
allocating unused_data fails, raises exception when allocating decompress
data failes; These are all only tiggerable when memory allocation fails.

Removes vistigial code from decompress flush; the fix to the main
"sync-flush" bug ensures that decompress always returns all available data.
This means that the decompress flush() can be simplified.

tidies code etc; these are just code cleanups... 


-------------------------------------------------------

Date: 2001-Feb-16 21:10
By: akuchling

Comment:
Can you provide a test program that will demonstrate some of the bugs
this patch fixes?  I'd like to be able to do a before-and-after
comparison.

-------------------------------------------------------

Date: 2001-Jan-23 08:26
By: nobody

Comment:
Argh... my line by line fix list got munged. You'll have to apply imaginary
comments to delimit each fix. 

The bug this fixes is 124981 "zlib decompress of sync-flushed data fails"

A lot of the patch changes are simply whitespace changes to clean up the
formating. The patch can probably be edited to only include the changes to
the PyZlib_objdecompress routine to fix the most important bug, but this
would leave the code even more inconsistant than it is. Most of the rest of
the fixes are to make the other routines cleaner, though they do also fix
the minor bugs mentioned.

-------------------------------------------------------

-------------------------------------------------------
For more info, visit:

http://sourceforge.net/patch/?func=detailpatch&patch_id=103373&group_id=5470