[Python-checkins] python/dist/src/Modules zlibmodule.c,2.66,2.67

akuchling at users.sourceforge.net akuchling at users.sourceforge.net
Tue Dec 28 21:10:51 CET 2004


Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27207/Modules
Modified Files:
	zlibmodule.c 
Log Message:
[Bug #1083110] calling .flush() on decompress objects causes a segfault due to an uninitialized pointer: fixes the problem and adds a test case
Index: zlibmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/zlibmodule.c,v
retrieving revision 2.66
retrieving revision 2.67
diff -u -d -r2.66 -r2.67
--- zlibmodule.c	3 Feb 2003 20:45:47 -0000	2.66
+++ zlibmodule.c	28 Dec 2004 20:10:48 -0000	2.67
@@ -301,6 +301,8 @@
 	return(NULL);
 self->zst.zalloc = (alloc_func)NULL;
 self->zst.zfree = (free_func)Z_NULL;
+ self->zst.next_in = NULL;
+ self->zst.avail_in = 0;
 err = deflateInit2(&self->zst, level, method, wbits, memLevel, strategy);
 switch(err) {
 case (Z_OK):
@@ -335,6 +337,8 @@
 	return(NULL);
 self->zst.zalloc = (alloc_func)NULL;
 self->zst.zfree = (free_func)Z_NULL;
+ self->zst.next_in = NULL;
+ self->zst.avail_in = 0;
 err = inflateInit2(&self->zst, wbits);
 switch(err) {
 case (Z_OK):
@@ -516,7 +520,7 @@
 	Py_END_ALLOW_THREADS
 }
 
- /* Not all of the compressed data could be accomodated in the output buffer
+ /* Not all of the compressed data could be accommodated in the output buffer
 of specified size. Return the unconsumed tail in an attribute.*/
 if(max_length) {
 	Py_DECREF(self->unconsumed_tail);


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /