[Python-checkins] python/dist/src/Modules zlibmodule.c, 2.66,
2.66.12.1
akuchling at users.sourceforge.net
akuchling at users.sourceforge.net
Tue Dec 28 21:31:30 CET 2004
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31141/Modules
Modified Files:
Tag: release23-maint
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.66.12.1
diff -u -d -r2.66 -r2.66.12.1
--- zlibmodule.c 3 Feb 2003 20:45:47 -0000 2.66
+++ zlibmodule.c 28 Dec 2004 20:31:27 -0000 2.66.12.1
@@ -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