[issue10276] zlib crc32/adler32 buffer length truncation (64-bit)

Nadeem Vawda report at bugs.python.org
Thu Jan 27 00:46:35 CET 2011


Nadeem Vawda <nadeem.vawda at gmail.com> added the comment:

Here is an update patch, which corrects a typo in the previous patch, and adds a test to test_zlib.

The test uses a memory-mapped sparse file, so it gets skipped on systems without mmap. The alternative would be to allocate a 4+GB buffer of ordinary memory, causes heavy swapping on my machine (4GB of RAM). The test also gets skipped on 32-bit builds, where the address space is too small for this bug to arise.

I'm not sure whether the test can count on the created file actually being sparse, so I had the test require the 'largefile' resource, to be on the safe side.

----------
Added file: http://bugs.python.org/file20543/zlib-v2.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10276>
_______________________________________


More information about the Python-bugs-list mailing list