Victor Stinner
e079eddf21
Close #18294 : Fix the zlib module to make it 64-bit safe
12 years ago
Larry Hastings
ed4a1c5703
Argument Clinic: rename "self" to "module" for module-level functions.
12 years ago
Larry Hastings
3182680210
Issue #16612 : Add "Argument Clinic", a compile-time preprocessor
for C files to generate argument parsing code. (See PEP 436.)
12 years ago
Victor Stinner
7979926616
Issue #18408 : Fix usage of _PyBytes_Resize()
_PyBytes_Resize(&v, new_size) sets v to NULL on error, so v cannot be used
anymore. Replace "Py_DECREF(v); v = NULL;" with "Py_CLEAR(v);".
13 years ago
Victor Stinner
bf2e2f9bdf
Issue #18408 : Fix zlib.compressobj() to handle PyThread_allocate_lock() failure
(MemoryError).
13 years ago
Victor Stinner
b7f1f65f1c
Issue #18227 : "Free" function of bz2, lzma and zlib modules has no return value (void)
13 years ago
Victor Stinner
5064a52bcb
Issue #18227 : Use PyMem_RawAlloc() in bz2, lzma and zlib modules
13 years ago
Victor Stinner
b64049183c
Issue #18203 : Replace malloc() with PyMem_Malloc() in Python modules
Replace malloc() with PyMem_Malloc() when the GIL is held, or with
PyMem_RawMalloc() otherwise.
13 years ago
Victor Stinner
bc8ccce729
Issue #9566 : zlib: Explicit cast to unsigned int to fix a compiler warning on Windows x64
13 years ago
Charles-Francois Natali
74ca886788
Issue #17917 : Use PyModule_AddIntMacro() instead of PyModule_AddIntConstant()
when applicable.
13 years ago
Victor Stinner
e8289618bf
zlib: Explicit cast to fix a compiler warning
13 years ago
Nadeem Vawda
19e568d254
Issue #15677 : Document that zlib and gzip accept a compression level of 0 to mean 'no compression'.
Patch by Brian Brazil.
13 years ago
Nadeem Vawda
99f9b8df98
Issue #15677 : Also fix docstrings in zlib module.
13 years ago
Nadeem Vawda
acfdfdafa2
Fix typo in backporting fix of issue #16411 to 2.7.
13 years ago
Nadeem Vawda
7ee955550b
Issue #16411 : Fix a bug where zlib.decompressobj().flush() might try to access previously-freed memory.
Patch by Serhiy Storchaka.
13 years ago
Nadeem Vawda
3c30970d29
Issue #16411 : Fix a bug where zlib.decompressobj().flush() might try to access previously-freed memory.
Patch by Serhiy Storchaka.
13 years ago
Nadeem Vawda
ee7889dec3
Issue #16350 , part 2: Set unused_data (and unconsumed_tail) correctly in decompressobj().flush().
Additionally, fix a bug where a MemoryError in allocating a bytes object could
leave the decompressor object in an invalid state (with its unconsumed_tail
member being NULL).
Patch by Serhiy Storchaka.
13 years ago
Nadeem Vawda
252f4dc6c9
Issue #16350 , part 2: Set unused_data (and unconsumed_tail) correctly in decompressobj().flush().
Additionally, fix a bug where a MemoryError in allocating a bytes object could
leave the decompressor object in an invalid state (with its unconsumed_tail
member being NULL).
Patch by Serhiy Storchaka.
13 years ago
Nadeem Vawda
6cad3712b3
Issue #16350 : Fix zlib decompressor handling of unused_data with multiple calls to decompress() after EOF.
Patch by Serhiy Storchaka.
13 years ago
Nadeem Vawda
39079946a2
Issue #16350 : Fix zlib decompressor handling of unused_data with multiple calls to decompress() after EOF.
Patch by Serhiy Storchaka.
13 years ago
Victor Stinner
56cb12542d
Issue #9566 : Explicit downcast to fix compiler warnings on Win64
13 years ago
Nadeem Vawda
2180c97a00
Document the rest of zlib.compressobj()'s arguments.
Original patch by Jim Jewett; see issue 14684.
14 years ago
Nadeem Vawda
cf5e1d82e3
Tidy up comments from dd4f7d5c51c7 (zlib compression dictionary support).
14 years ago
Nadeem Vawda
fd8a838d58
Issue #14684 : Add support for predefined compression dictionaries to the zlib module.
Original patch by Sam Rushing.
14 years ago
Nadeem Vawda
64d25ddb9c
Issue #12306 : Add ZLIB_RUNTIME_VERSION to the zlib module.
While we're at it, also document ZLIB_VERSION.
Patch by Torsten Landschoff.
15 years ago
Nadeem Vawda
524148ad7a
Issue #12839 : Fix crash in zlib module due to version mismatch.
If the version of zlib used to compile the zlib module is incompatible
with the one that is actually linked in, then calls into zlib will fail.
This can leave attributes of the z_stream uninitialized, so we must take
care to avoid segfaulting by trying to use an invalid pointer.
Fix by Richard M. Tew.
15 years ago
Nadeem Vawda
bbabbae114
Issue #12839 : Fix crash in zlib module due to version mismatch.
If the version of zlib used to compile the zlib module is incompatible
with the one that is actually linked in, then calls into zlib will fail.
This can leave attributes of the z_stream uninitialized, so we must take
care to avoid segfaulting by trying to use an invalid pointer.
Fix by Richard M. Tew.
15 years ago
Nadeem Vawda
97d67924e3
Issue #12839 : Fix crash in zlib module due to version mismatch.
If the version of zlib used to compile the zlib module is incompatible
with the one that is actually linked in, then calls into zlib will fail.
This can leave attributes of the z_stream uninitialized, so we must take
care to avoid segfaulting by trying to use an invalid pointer.
Fix by Richard M. Tew.
15 years ago
Nadeem Vawda
3bf71c54d8
Fix incorrect comment in zlib.Decompress.flush().
Reported by Oleg Oshmyan in issue #12646 .
15 years ago
Nadeem Vawda
1c38546e49
Issue #12646 : Add an 'eof' attribute to zlib.Decompress.
This will make it easier to detect truncated input streams.
Also, make zlib's error messages more consistent.
15 years ago
Nadeem Vawda
0c3d96ae1d
Issue #8650 : Make zlib.[de]compressobj().[de]compress() 64-bit clean.
Raise an OverflowError if the input data is too large, instead of silently
truncating the input and returning an incorrect result.
15 years ago
Nadeem Vawda
154bdf92fc
Fix memory leaks in zlib.compress() and .decompress().
Also, make sure that test_zlib tests decompress() for overly-large inputs.
15 years ago
Nadeem Vawda
1b8a417d9f
Issue #8650 : Backport 64-bit safety fixes for compress() and decompress().
15 years ago
Nadeem Vawda
0cc4fd9df7
Issue #12050 : zlib.decompressobj().decompress() now clears the unconsumed_tail
attribute when called without a max_length argument.
15 years ago
Nadeem Vawda
7619e88adb
Issue #12050 : zlib.decompressobj().decompress() now clears the unconsumed_tail
attribute when called without a max_length argument.
15 years ago
Antoine Pitrou
9e719b6eba
Merged revisions 88460,88464,88466,88486,88511,88652 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88460 | antoine.pitrou | 2011-02-21 19:03:13 +0100 (lun., 21 févr. 2011) | 4 lines
Issue #10276 : Fix the results of zlib.crc32() and zlib.adler32() on buffers
larger than 4GB. Patch by Nadeem Vawda.
........
r88464 | antoine.pitrou | 2011-02-21 20:05:08 +0100 (lun., 21 févr. 2011) | 3 lines
Fix issues on 32-bit systems introduced by r88460
........
r88466 | antoine.pitrou | 2011-02-21 20:28:40 +0100 (lun., 21 févr. 2011) | 3 lines
Fix compile error under MSVC introduced by r88460.
........
r88486 | antoine.pitrou | 2011-02-22 00:41:12 +0100 (mar., 22 févr. 2011) | 5 lines
Issue #4681 : Allow mmap() to work on file sizes and offsets larger than
4GB, even on 32-bit builds. Initial patch by Ross Lagerwall, adapted for
32-bit Windows.
........
r88511 | antoine.pitrou | 2011-02-22 22:42:56 +0100 (mar., 22 févr. 2011) | 4 lines
Issue #11277 : finally fix Snow Leopard crash following r88460.
(probably an OS-related issue with mmap)
........
r88652 | antoine.pitrou | 2011-02-26 16:58:05 +0100 (sam., 26 févr. 2011) | 4 lines
Issue #9931 : Fix hangs in GUI tests under Windows in certain conditions.
Patch by Hirokazu Yamamoto.
........
15 years ago
Antoine Pitrou
bf709fe08c
Merged revisions 88464,88466 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88464 | antoine.pitrou | 2011-02-21 20:05:08 +0100 (lun., 21 févr. 2011) | 3 lines
Fix issues on 32-bit systems introduced by r88460
........
r88466 | antoine.pitrou | 2011-02-21 20:28:40 +0100 (lun., 21 févr. 2011) | 3 lines
Fix compile error under MSVC introduced by r88460.
........
15 years ago
Antoine Pitrou
4709ec0686
Fix compile error under MSVC introduced by r88460.
15 years ago
Antoine Pitrou
3d32664271
Fix issues on 32-bit systems introduced by r88460
15 years ago
Antoine Pitrou
f3d22755f9
Merged revisions 88460 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88460 | antoine.pitrou | 2011-02-21 19:03:13 +0100 (lun., 21 févr. 2011) | 4 lines
Issue #10276 : Fix the results of zlib.crc32() and zlib.adler32() on buffers
larger than 4GB. Patch by Nadeem Vawda.
........
15 years ago
Antoine Pitrou
54f0f84e9f
Issue #10276 : Fix the results of zlib.crc32() and zlib.adler32() on buffers
larger than 4GB. Patch by Nadeem Vawda.
15 years ago
Victor Stinner
8848c7a37f
Issue #8650 : zlib.compress() and zlib.decompress() raise an OverflowError if
the input buffer length doesn't fit into an unsigned int (length bigger than
2^32-1 bytes).
15 years ago
Antoine Pitrou
96f212b377
Merged revisions 81100 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r81100 | antoine.pitrou | 2010-05-12 01:46:02 +0200 (mer., 12 mai 2010) | 10 lines
Merged revisions 81098 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81098 | antoine.pitrou | 2010-05-12 01:42:28 +0200 (mer., 12 mai 2010) | 5 lines
Issue #8681 : Make the zlib module's error messages more informative when
the zlib itself doesn't give any detailed explanation.
........
................
16 years ago
Antoine Pitrou
53b2166f0b
Merged revisions 81098 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81098 | antoine.pitrou | 2010-05-12 01:42:28 +0200 (mer., 12 mai 2010) | 5 lines
Issue #8681 : Make the zlib module's error messages more informative when
the zlib itself doesn't give any detailed explanation.
........
16 years ago
Antoine Pitrou
ca561f5e72
Merged revisions 81098 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81098 | antoine.pitrou | 2010-05-12 01:42:28 +0200 (mer., 12 mai 2010) | 5 lines
Issue #8681 : Make the zlib module's error messages more informative when
the zlib itself doesn't give any detailed explanation.
........
16 years ago
Antoine Pitrou
fc3bfad2e0
Issue #8681 : Make the zlib module's error messages more informative when
the zlib itself doesn't give any detailed explanation.
16 years ago
Antoine Pitrou
7f14f0d8a0
Recorded merge of revisions 81032 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r81032 | antoine.pitrou | 2010-05-09 17:52:27 +0200 (dim., 09 mai 2010) | 9 lines
Recorded merge of revisions 81029 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
................
16 years ago
Antoine Pitrou
f95a1b3c53
Recorded merge of revisions 81029 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
16 years ago
Antoine Pitrou
c7c96a90bc
Recorded merge of revisions 81029 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
16 years ago
Antoine Pitrou
c83ea137d7
Untabify C files. Will watch buildbots.
16 years ago