[Python-checkins] CVS: python/dist/src/Lib/test/output test_zlib,1.4,1.5

Jeremy Hylton jhylton@users.sourceforge.net
Tue, 16 Oct 2001 13:39:51 -0700


Update of /cvsroot/python/python/dist/src/Lib/test/output
In directory usw-pr-cvs1:/tmp/cvs-serv21328/Lib/test/output

Modified Files:
	test_zlib 
Log Message:
[ #403753 ] zlib decompress; uncontrollable memory usage

Mostly by Toby Dickenson and Titus Brown.

Add an optional argument to a decompression object's decompress()
method.  The argument specifies the maximum length of the return
value.  If the uncompressed data exceeds this length, the excess data
is stored as the unconsumed_tail attribute.  (Not to be confused with
unused_data, which is a separate issue.)

Difference from SF patch: Default value for unconsumed_tail is ""
rather than None.  It's simpler if the attribute is always a string.



Index: test_zlib
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_zlib,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** test_zlib	2001/02/21 02:17:01	1.4
--- test_zlib	2001/10/16 20:39:49	1.5
***************
*** 9,11 ****
--- 9,14 ----
  decompress with init options succeeded
  decompressobj with init options succeeded
+ should be '': ''
+ max_length decompressobj succeeded
+ unconsumed_tail should be '': ''
  Testing on 17K of random data